5

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

  1. Upgraded to Mountain Lion
  2. Forced JRE install through java -version method. "Successful"
  3. All Java applications work as before (ide/dbms/email/etc)
  4. Tried to launch a java applet in Chrome (or Safari)
  5. Message in the applet area "Missing Plugin =>". click it
  6. Error that the 'JRE is not installed, click ok to open page...'.
  7. Click [OK] but no page opens. Assume this is because the JRE is actually already installed.
  8. 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.

3 Answers 3

4

At About Java for OS X 2012-006 (article HT5493, modified 2012-10-16) Apple gives a related article:

Please run all four commands. The fourth should re-enable Java SE 6 Web Start.

9
  • That appears to work. Still testing other stuff. The page sparkles with references such as "if, after installing Java for OS X 2012-006 and Java 7", and I read of problems with it (here as well), so it didn't look like it applied. But, it does, even if you don't install Java7. Also, try to avoid basically writing a new question when you edit. We see them as our content, not community (right or wrong). SO is less overbearing, but edits there seem by-fiat and based on personal taste.
    – Andrew
    Nov 27, 2012 at 3:39
  • Sorry, the intention wasn't to overbear, I tried hard to keep the essence of the question whilst making uppermost the key points etc.. Feel free to revert or even better, make your own edit. You make very good points about Apple's document – I'll request an improvement. Thanks. Nov 27, 2012 at 21:03
  • 1
    This worked for more applets I have tried. In the start I just tried one. The most important (citrix) still has an issue that might be because of the update, but I think that is unrelated.
    – Andrew
    Nov 28, 2012 at 3:37
  • Thanks again. Incidentally if you find that the Citrix applet works with an EA Java 8, maybe add that one under Reasons to prefer Java 8 early access (instead of both Java 6 Update 37 and Java 7 Update 9) for the JRE (but not the Java applet plug-in). Or if that Citrix applet requires something less than Java 6 Update 37, there's Which browsers with an integral Java runtime environment (JRE) can run that JRE on Mountain Lion? but I suspect that the answer there will be a simple "None.". Nov 28, 2012 at 5:42
  • 1
    Article linked, HT5559, worked for me to enable java web start on OS X Lion. Dec 19, 2012 at 15:57
0

I solved my problem with javaws with this:

  1. I went into the /usr/bin directory:

    cd /usr/bin/
    
  2. Just in case made a backup copy of the existing javaws:

    sudo mv javaws ./javaws.ORIGINAL
    
  3. Create a new link to a javaws file that I found when searching my file system (probably create on a previous installation of Java):

    sudo ln -s /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/javaws ./javaws
    

Et voilà! javaws start working again!

-1

Have you checked "Enable applet plug-in and Web Start Applications" in "Java Preferences" ??

http://support.zipform.com/zf6/KBA-01629.asp

5
  • 1
    This is removed in ML (10.8), hence the problem and tag and title.
    – Andrew
    Nov 26, 2012 at 2:09
  • Well - it is only removed i ML if you have upgraded to JRE/JDK 7, and as I read the problem described, then it is still JRE/JDK 6 that is been used. Nov 26, 2012 at 7:11
  • It is removed when upgrading to 10.8.2 as I did. I am fairly sure other versions of 10.8 are also affected. I have never installed JDK/JRE 7. This was apparent the moment the upgrade was complete. Lost me access to citrix until I can get them to allow reciever access. apple.stackexchange.com/questions/68743/… , and google - google.com/search?q=mountain+lion+removes+java+preferences
    – Andrew
    Nov 26, 2012 at 7:44
  • 1
    No, the OS X 10.8.2 update didn't remove the Java 6 setup on your system - but the Java update 2012-006 where you got the JRE/JDK 6 update 37 did that - support.apple.com/kb/HT5493 Nov 26, 2012 at 14:12
  • You are right. I don't know what I was thinking, i'm sorry about that. It must have been something I ate. Even my question mentions the update as doing it, not ML. I think I just installed them back-to-back basically. If you edit the question (however briefly) I'll fix my foolish vote.
    – Andrew
    Nov 28, 2012 at 3:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .