8

Chrome refused to run a java app unless i upgraded to .45, which I did my dling the installer from oracle. Java 7 u45. Installer said it worked. Chrome still won't start java.

$ which java
/usr/bin/java

$ java -version
java version "1.7.0_06"
Java(TM) SE Runtime Environment (build 1.7.0_06-b24)
Java HotSpot(TM) 64-Bit Server VM (build 23.2-b09, mixed mode)
~/private/WDI/git🍔  

I may be easily fooled, but that doesn't say "45" anywhere. (Yes, "06", and "24" and "23.2-b09", but nary a 45. Such numbers!)

Anybody know if this is u45, or where the installer placed it?

UPDATE: there is a Java System Preference Panel that says "Your system has the recommended version of Java: Java 7 Update 45." Still, Chrome doesn't appear to see it.

2
  • How did you install Java and where did you get it from (the link please asOraclke supplies sever versions)
    – mmmmmm
    Commented Dec 2, 2013 at 21:13
  • java.com/en/download/mac_download.jsp. This link is provided by Chrome. CLicking on "I understand ..." initiates a download of jre-7u45-macosx-x64.dmg
    – Chap
    Commented Dec 2, 2013 at 21:58

3 Answers 3

9

The issue is that Oracle is being confusing abut the JRE.

The OSX JRE, which is what you downloaded, does not update /usr/bin/java it just installs itself to /Library/Java/JavaVirtualMachines/

You can either use the path to the java binary beneath that or instead install the JDK from this page which does update /usr/bin/java

@RichTrouton's answer might be correct on what Chrome uses i.e. a 32 bit JRE but this answer explained /usr/bin/java issues. Note that the simple Oracle JRE does not update /usr/bin/java and I think Apple's later installs do not touch this either. Your browser does not use /usr/bin/java but directly looks in /System or /Library

4

Google Chrome is a 32-bit browser, which prevents it from being able to work with Oracle’s 64-bit Java 7 browser plug-in. If you need to run Java applets inside of Chrome, here's what you'll need to do:

  1. Install the latest Java 6 from Apple. As of 12-4-2013, that is Java for OS X 2013-005.

  2. Follow these directions (taken from this Apple KBase article) to remove the Oracle Java 7 browser plug-in and enable the Apple Java 6 browser plug-in:

A. Open Terminal, located in the Utilities folder.

B. Enter this command, then press the Return or Enter key:

sudo mkdir -p /Library/Internet\ Plug-Ins/disabled

C. Enter this command, then press the Return or Enter key:

sudo mv /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin /Library/Internet\ Plug-Ins/disabled

D. Enter this command, then press the Return or Enter key:

sudo ln -sf /System/Library/Java/Support/Deploy.bundle/Contents/Resources/JavaPlugin2_NPAPI.plugin /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin 

E. To re-enable Java SE 6 Web Start, enter this command, then press the Return or Enter key:

sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Commands/javaws /usr/bin/javaws

Once the Apple Java 6 browser plug-in is in place, quit and relaunch Chrome. On relaunch, try accessing the Java applet in Chrome again.

-1
  • Open your Terminal, using java -version gives you an error or Java Version 6.
  • Get the SRE dmg at https://www.java.com/en/download/index.jsp
  • Install it
  • In your terminal, type: export JAVA_HOME="/Library/InternetPlug-Ins/JavaAppletPlugin.plugin/Contents/Home"
  • java -version now gives you java version "1.7.0_**" (i.e. newest java version)

To make this work every time you boot up terminal type the following line of code into terminal.

echo export JAVA_HOME=\"/Library/Internet Plug- Ins/JavaAppletPlugin.plugin/Contents/Home\" >> ~/.bash_profile

This will make it use java 7 every time you use terminal.

References: https://stackoverflow.com/a/19582689/2719960 (Note: the second answer in the Stack Overflow question, not the one marked as correct is the one you want. The one marked as correct install Java 6 back onto Mavericks, I believe).

2
  • My answer does not reinstall Java 6 back. Oracle only provides Java 1.7 (and the SO answer is wrong as the question asks for JDK which is a simple install rather than messing around with links). I would also note my answer is for the /usr/bin/java bit
    – mmmmmm
    Commented Feb 13, 2014 at 11:56
  • @Mark err, sorry. I wasn't talking about your answer, but the answer marked as correct on the SO site. It also doesn't mess with links, it just redirects the JAVA_HOME variable. But you're right it is somewhat incorrect. Editing my answer now.
    – DonyorM
    Commented Feb 13, 2014 at 12:15

You must log in to answer this question.

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