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 25, 2012 2:19 AM in response to jklap

This is helping me to get where I need to be but Im stuck at one pivotal place.


Once the app is gone and 7 removed can you just copy the preferences app back from another mac I need to be able to prioritise the architectures like you were able to with the preferences app.



Using all available info so far I have both javatester and java -version reporting the same thing but my app still doesnt work and until the dev company resolve to getting it to work in 7 I really need to roll back.


By doing your suggestion I get


> /usr/libexec/java_home -V


Matching Java Virtual Machines (2):

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


My app still doesnt work and I'm loathed to restore the mac unless it is the ONLY way to get it back. I wonder if I need the i386 version as the top version used?


Hope that makes sense.

Oct 25, 2012 2:52 AM in response to ITFC Help

ITFC Help wrote:


Once the app is gone and 7 removed can you just copy the preferences app back from another mac I need to be able to prioritise the architectures like you were able to with the preferences app.

A few users have claimed that they were able to do this, but about an equal number said it did not work after they copied it. None of the authoritative writeups on this subject have recommended it. Apparently the reason it won't allow one to switch between 6 and 7 is that 7 is stored in a different place, so Java Prefs doesn't find it, but that's not your situation, so it might work for you.

My app still doesnt work and I'm loathed to restore the mac unless it is the ONLY way to get it back. I wonder if I need the i386 version as the top version used?

You haven't told us what that app is, but at least one developer found their Gradebook app did not work with 1.6.0_37 either and has issued instructions for a work-around.


If your app is running in 32-bit mode, then perhaps you do need to move i386 to the top, but I would think the system would be able to properly sort that out as long as they are both active. You should be able to select it with:

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

Oct 25, 2012 2:57 AM in response to ITFC Help

EDIT: Hah Im too slow, thanks


I assume it is to use /usr/libexec/java_home -d32 -v 1.6*


Ive probably trashed all the Java with trying all these things. Is there no way to start from scratch without 'starting from scratch'


The app is a bespoke java video player. Im typically a windows support chap but as far as anybody else is concerned I deal with anything with electricity so I must now what Im doing.

Oct 25, 2012 3:12 AM in response to ITFC Help

ITFC Help wrote:


Is there no way to start from scratch without 'starting from scratch'

Somebody posted instructions for OS X 10.7 Lion users that would return them to 1.6.0_29, by not running software update to get to _37. It looks like there is a way for Snow Leopard 10.6 users to do that, also.


I strongly recommend against it because it re-opens the CVE-2011-3544 vulnerability to Flashback and other minor malware.

Oct 25, 2012 9:57 AM in response to MadMacs0

ITFC Help wrote:


javatester shows 1.7.0_06

java -version shows 1.6.0_35

java_home -V still only shows the two? 1.6.0_35?

Before you reported that you had 1.6.0_37, how did it get back to _35?


I suspect javatester knows the new place to look for Java 7. When you installed it before, was it the JRE or JDK version? The former just installs a new plugin while the latter installs what you need to run Java 7 outside of your browser. java_home probably only knows where Java 6 is right now.

Now it's back to missing plugin?

Do you care about the plugin? It isn't used by your desktop app, only your web browsers. You haven't said and your profile doesn't seem to reveal what OS X you are running, but with no plugin then I suspect it's Snow Leopard. If Lion or ML and you want to revert the plugin, as well, then then Java for OS X 2012-006: How to re-enable the Apple-provided Java SE 6 applet plug-in and Web Start functionality

Nov 2, 2012 12:18 PM in response to anyberry1

when i type the command java home into the terminal i get the following returned:


Exception in thread "main" java.lang.NoClassDefFoundError: home

Caused by: java.lang.ClassNotFoundException: home

at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

at java.lang.ClassLoader.loadClass(ClassLoader.java:247)


any ideas what this means?


thanks

Nov 2, 2012 12:41 PM in response to jklap

Thanks!! This totally solved my problem.


For reasons I too complicated to describe here, java_home on my mac was deleted and didn't get restored when I re-installed Java.


After a fresh-install of Mountain Lion AND Java, java_home worked just fine.


For the command-line, I simply added:


export JAVA_HOME=`/usr/libexec/java_home -v 1.6`


in my .bash_profile script.


For java GUI apps (eg: Eclipse), they just worked with no issues.

Dec 24, 2012 12:14 PM in response to anyberry1

I first installed ORACLE's 1.7 and then also installed apple's 1.6 through update, as many Java-based Mac-Apps need 1.6. But you can't make 1.6 the default through the NEW JAVA preference pane in System Prerferences, because it doesn't see 1.6. So your next choice would be Java Preferences.app in /Applications/Utilities, but this one's gone. I had to reinstall it.


The 10.8 dmg has it under /Packages/JavaEssentials.pkg


I googled around and found a link:


http://appleupdate.centenary.usyd.edu.au/appleupdates/content/downloads/11/30/04 1-4540/6JfG7McpmBmS2nbCWvJXX9GQmYhYQ8dWQJ/JavaEssentials.pkg


After the install you find your old Java Preferences.app in its old place, allowing you to switch between all installed JAVA versions and allowing your Browsers to use applets again.


Yet another barrier for JAVA broken down.

Jun 29, 2013 12:45 AM in response to frafa

I have installed Oracle's latest java JDK 1.7 as default here on 10.8.4 for security reasons. But I also wanted to be able to continue to use Apple's java 1.6 with some apllications that depend on it. The fixed upade 2013-004 (Build ...M4509) works well again.

Switching the default java would be a possibility, but I seems rather cumbersome to switch back and forth each time.

I found a solution that allows me to have java 1.7 as default and switch to 1.6 in conjunction with the launch of a specific app. It involves exporting java as described by Gerry above and launching the app via AppleScript.

I made an AppleScript.app rather than resorting to the terminal each time.


The following is an example which works for me in this case with the program JGR.app (a nice java GUI for R and Deducer).


Open AppleScriptEditor

type in the following 3 lines


do shell script "JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home

export JAVA_HOME

/Applications/JGR.app/Contents/MacOS/JGR"


save the app

by selecting "Application" from the drop down menu and name the app as you like.


Double clicking the newly created app will invoke the java version specified in the script and start the program. Double clicking the progrm itself will still attempt to start it under the default java environment, if that works.


The script assumes that all components reside in their typical location on the Mac. Otherwise the path needs to changed accordingly. It also requires the java program to call java via java_home.


It is not a switch, but a convenient way to use different java versions side by side without a need for repeatedly switching the default.

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.