Why does Java SE 6 Web Start (javaws) not find the JRE with Apple's Java for OS X 2012-006 on Mountain Lion?
In brief
The JRE is installed but javaws
can not find the JRE.
What can I do on the command line to re-enable the web plugin for Apple's Java 6 in Chrome or Safari?
I want to avoid Java 7. (We're awaiting Java 8.)
Detail
I have a fresh upgrade of Mountain Lion (10.8.2). I have installed JDK V6 from Apple (Java for OS X 2012-006). Now:
- all of my Java apps run fine
- the Internet plug-in no longer works in Chrome or Safari.
javaws
at the command line reports:
No JRE present
When a web applet is clicked:
- the operating system directs me to install a JRE
- the link goes nowhere because the JRE is already installed.
History
- Upgraded to Mountain Lion
- Forced JRE install through
java -version
method. "Successful" - All Java applications work as before (ide/dbms/email/etc)
- Tried to launch a java applet in Chrome (or Safari)
- Message in the applet area "Missing Plugin =>". click it
- Error that the '
JRE is not installed, click ok to open page...
'. - Click [OK] but no page opens. Assume this is because the JRE is actually already installed.
- Try from command line (
/usr/bin/javaws
):
When I try /usr/bin/javaws
from the command line I get this output, plus the standard install-a-jre popup.
[~] /usr/bin/javaws (or just [~] javaws)
No Java runtime present, requesting install.
Unable to locate a Java Runtime to invoke.
– but the JRE is present –
[~] /usr/bin/java -version
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)
– Java apps do run.
Java executables
[~] ll -s /usr/bin/java*
/usr/bin/java@ -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
/usr/bin/javac@ -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javac
/usr/bin/javadoc@ -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javadoc
/usr/bin/javah@ -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javah
/usr/bin/javap@ -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javap
/usr/bin/javaws@ -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javaws
I heard that it may be possible to install the Java 7 JDK (including a JRE) to regain preferences and enable switching. If that is the only course of action I will do it, but I would much prefer JAVA_HOME
to work properly with Java 6 without Java 7.
Apple's Java Preferences utility is no longer applicable – Apple's most recent update for Java for OS X removes the utility.
At About Java for OS X 2012-006 (article HT5493, modified 2012-10-16) Apple gives a related article:
- Java for OS X 2012-006: How to re-enable the Apple-provided Java SE 6 applet plug-in and Web Start functionality (article HT5559, modified 2012-10-22).
Please run all four commands. The fourth should re-enable Java SE 6 Web Start.