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?
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?
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.