Java Preferences app missing after java update

The last java update on OS X includes this:

""This update also removes the Java Preferences application, which is no longer required to configure applet settings."


Really? I understand that you can only use oracle java for java applets now, ok. But what about switching between different versions of Java that you want to use on the command line? I guess I'll recover the app from backup. Just wondering if there is an alternative and if this decision had some logic.

OS X Mountain Lion (10.8.2)

Posted on Oct 18, 2012 5:55 AM

Reply
44 replies

Oct 23, 2012 5:10 PM in response to Gerry Panganiban

For those of us using the command line, you can use java_home to "pick" the JDK even though the Java Preferences app has been removed and without mucking with CurrentJDK (which is what I used to do until I found this trick). This can be used to set your JAVA_HOME such as adding the following to your ~/.bash_profile:


export JAVA_HOME=`/usr/libexec/java_home`


Assuming whatever you do uses JAVA_HOME (such as maven), your golden


By default, java_home returns the 'default', which is Java 7:


/Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home


You can see all the possible options using -V:


> /usr/libexec/java_home -V


Matching Java Virtual Machines (5):

1.7.0_09, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home

1.7.0_07, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home

1.7.0_06, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_06.jdk/Contents/Home

1.6.0_37-b06-434, x86_64: "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

1.6.0_37-b06-434, i386: "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home



Once you know what you have and which you want, you can specify:


/usr/libexec/java_home -d64 -v 1.6.0_37


Or to choose the latest installed 1.6.X:


/usr/libexec/java_home -d64 -v 1.6*


Check the man page for java_home for additional details

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Java Preferences app missing after java update

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.