Can’t run Java plugin in Chrome for Mac OSX after installing Oracle JDK 7?

If you are using Mac OSX (i am on Lion)  and you just installed Oracle JDK / JRE 7  your Java applets in Chrome will stop working. You will basically be told Chrome does not support Java 7 on the Mac platform. A 64-bit browser (Safari or Firefox, for example) is required to run Java 7 on Mac OS X. 32-bit browsers such as Chrome do not support Java 7 on the Mac platform.

One way to fix this is to get rid of JDK 7 and go back to Apple Java 6 which came with your system. If you can’t get rid of Java 7 because you use it lets say for writing software, then you can continue to do that and simply switch your browsers to use Java Internet Plugin that came with Apple Java 6 but still keep using Java 7 for your other development activities.

Just run the commands below in your Terminal. You can also see this in apple support forums here

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

What this will do is that it will replace the System Java Internet Plugin with the one which came default as part of Apple Java 6. While you can still use Java 7 for software you have to write.

new-host-3:MacOS usamadar$ java -version
java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)

2 thoughts on “Can’t run Java plugin in Chrome for Mac OSX after installing Oracle JDK 7?

  1. Pingback: Java 7 su lion problema chrome e Firefox

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s