Changing default JDK in Mac OS X Mavericks

So i have two installations of JDK on my Mac OS X. 1.7 and 1.8. The following is to list all JDK in Mac.


/usr/libexec/java_home -V

The above command resulted in the following:

Matching Java Virtual Machines (2):
    1.8.0_05, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home
    1.7.0_25, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home

/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home

Because of some problem with Spring when using Java 8, i need to change the default back to Java 7. This is what i do to the .profile file in my home directory.

export JAVA_HOME=`/usr/libexec/java_home -v 1.7`
#export JAVA_HOME=`/usr/libexec/java_home -v 1.8`

Sorted!

0 komentar:

Posting Komentar