Reputation: 10495
Upvotes: 2
Views: 5499
Reputation: 2330
JRE means Java Runtime Environment. Most Java Software only needs a JRE to run.
JDK means Java Development Kit. A JDK allways includes a JRE. If you develop you most certainly allways use the JDK, since it contains source and docs of java's own Classes.
Also there is software (usually software for development) that uses tools of the JDK to run, e.g. this software needs the JDK as runtime environment (for example: ant).
JVM means Java Virtual Machine and is the program that runs your java program no matter if in JRE or JDK.
JAVA_HOME
is the path to the JDK
JRE_HOME
is the path to the JRE
Upvotes: 2
Reputation: 2484
JAVA_HOME
system variable usually is required for enterprice java software (application servers, DBs, development tools and so on). You should set JAVA_HOME
variable to root directory of JDK or JVM(setting it to JDK always works, but maybe some software will run as expected with JAVA_HOME
pointing to JRE). If you set JAVA_HOME
right then $JAVA_HOME/bin/java -version
command should pring version of java.Upvotes: 3
Reputation: 3750
bin
directory, which in turn contains the java executables.Upvotes: 1