I am having trouble with Java Web Start on MacOS X. I am running MacOS 10.8.4 and have Java 7 update 25 installed (JDK and JRE installed). Attempting to launch a Java Web Start application from either Safari, the Finder, or the command line fails with the error message:
"To open this Web Start application, you need to download the Java Runtime Environment."
There is then a link to then download the JRE from Oracle.
Running "/usr/libexec/java_home -V" gives me the following:
Matching Java Virtual Machines (3):
1.7.0_25, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home
1.6.0_51-b11-457, x86_64: "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
1.6.0_51-b11-457, i386: "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Also, the Java Control Panel it has one Java version listed (1.7.0_25) at this location:
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java
I can get Java web start working by directly invoking javaws under either:
- /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin
- /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home
The Java webstart on the path by default is in /usr/bin is a link to /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javaws. This is Apple's Java 6 installation. Running java/javac from the commandline (also located in /usr/bin) brings up Java 7 update 25 - so this problem only appears to be Java Web Start related. Although /usr/bin/java is not a link, it is resulting in the correct java version being run.
I did try relinking /usr/bin/javaws to one of the Java 7 update 25 copies but that didn't work - I would get an error message about an improperly defined JAVAWS_HOME variable (defining/exporting a variable didn't work).
I then thought that I might be able to get around the problem by associating .jnlp with Oracle's javaws executable but that isn't feasible. You can't link a file type against a command line application. I then discovered that when a Java Web Start application is launched from the Finder or Safari the application "/System/Library/CoreServices/Java Web Start.app" is invoked. Using otool I discovered that this links against a JavaLaunching.framework (which is a private undocumented Apple framework). This app evidently is responsible for launching a graphical Java applications (and picking the right versions/prohibiting users from running the old Java 6 stuff etc.). Poking around I haven't been able to figure out how Java Web Start.app finds other Java versions and why it is failing to see Java 7 update 25. I have poked around in defaults and checked just about every plist file I can find. Note, I have version 14.8.0 of the Java Web Start.app application according to the plist file.
Note: I have enabled Java Content in the browser.
So any idea how to fix this? This is affecting both my personal laptop and practically every machine at work (some brand new and others years old).
Thanks,
-Ryan