Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 8112  / 2 Years ago, wed, september 21, 2022, 3:57:14

I have an ubuntu 11.10 with eclipse installed, now I am supposed to need JVM, Java compiler and something called API.
I am starting to learn Java, because it is easy to make it work on windows after.
So what do I install?


More From » 11.10

 Answers
1

I am supposed to need JVM, Java compiler and something called API




The Java Virtual Machine (JVM) is what runs the Java applications (compiled into bytecode). The Java API is the set of existing features that are implemented the runtime libraries: everything documented here. Both the JVM and the runtime libraries form the Java Runtime Environment (JRE). Its main command is java.



The Java compiler, used via the javac commandin the Java Development Kit (JDK), is what turns source code into bytecode, which can be run with the JRE.



The OpenJDK JRE is available in the openjdk-6-jre package and the OpenJDK in the openjdk-6-jdk package (which depends on openjdk-6-jre anyway).



Eclipse needs the JRE to run, but provides its own compiler (Eclipse JDT). Strictly speaking, you don't need the JDK to develop with Eclipse, you could compile everything within Eclipse and run your applications through the JRE.



This being said, if you're a beginner, it's certainly worth trying a few toy applications with javac, if only to understand how the compilation process, package/directory structures and classpath work. IDEs like Eclipse can make a lot of this conveniently automated or invisible (which can be very useful), but knowing the basics helps when you run into problems.
Unless you're short of disk space, it makes sense to install both the JRE and the JDK, even if you're using Eclipse.


[#39564] Thursday, September 22, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
alliulet

Total Points: 46
Total Questions: 109
Total Answers: 97

Location: Svalbard and Jan Mayen
Member since Sat, Oct 10, 2020
4 Years ago
;