2
$ echo $JAVA_HOME 
/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home
$ /usr/libexec/java_home --verbose
Matching Java Virtual Machines (2):
   1.6.0_65-b14-468, x86_64:    "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
   1.6.0_65-b14-468, i386:  "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

$ ls /Library/Java/JavaVirtualMachines
1.6.0.jdk/
jdk1.7.0_17.jdk/
jdk1.7.0_71.jdk/
jdk1.7.0_80.jdk/
jdk1.8@ -> jdk1.8.0_66.jdk
jdk1.8.0_66.jdk/

How do I get /usr/libexec/java_home to return my Java 1.8 VMs?

3

1 Answer 1

2

The problem here is that Oracle have chnaged the meaning of JRE on Macs.

The Apple and Sun definition is JRE is the runtime for apps and web applets.

Oracle's definition of JRE is for webapps only. This means that it does not change /usr/bin/java

The JDK definition had not changed. Oracle has this at http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html#javasejdk

Oracle does also have a old style JRE that changes /usr/bin/java but have hidden it

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .