After downloading the Oracle JDK and unzipping it, I can see that there exists two java executables in two different directories.Which one should be used as primary basis. Or, both are the same in two different locations?
what's the difference between java located inside jdk/bin/ and jdk/jre/bin
jdk
The contents of jdk/bin/ is the Java that's included with the Java Developers Kit. The Java inside of jdk/jre/bin would be the Java Runtime Environment's Java.If you have the JDK packaged version of Java then use the one in jdk/bin/.But they're the sameIf you look at the executables there is actually no difference in them, so it really doesn't matter.$ pwd/usr/java/jdk1.7.0_45$ ll jre/bin/java-rwxr-xr-x. 1 root root 7718 Oct  8  2013 jre/bin/java[saml@greeneggs jdk1.7.0_45]$ ls -l bin/java-rwxr-xr-x. 1 root root 7718 Oct  8  2013 bin/java$ cmp jre/bin/java bin/java$