Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 4 down vote accepted

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.

share|improve this answer
    
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 Backer Nov 27 '12 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. –  Graham Perrin Nov 27 '12 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 Backer Nov 28 '12 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.". –  Graham Perrin Nov 28 '12 at 5:42
1  
Article linked, HT5559, worked for me to enable java web start on OS X Lion. –  Tom Harrison Jr Dec 19 '12 at 15:57

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

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

share|improve this answer
1  
This is removed in ML (10.8), hence the problem and tag and title. –  Andrew Backer Nov 26 '12 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. –  Rene Larsen Nov 26 '12 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 Backer Nov 26 '12 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 –  Rene Larsen Nov 26 '12 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 Backer Nov 28 '12 at 3:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.