June 08, 2010

Make JavaFX applets smooth on Firefox for Mac

Lately when I was browsing websites with JavaFX applets I noticed the Java plugin would either not work, load slowly, crash or flicker when scrolling the page. This wasn't the case on Safari, so I looked at the about:plugins URL which lists the currently installed plugins in Firefox.

I noticed 2 unknown plugins to me called MRJPlugin and Java Embedding Plugin, a plugin that's apparently shipped with every Firefox on Mac OSX. Basically this plugin allows to use the latest Java version in the browser. Since Java 6 update 10 with it's Java Applet Plugin v2 is available for Mac OSX Snow Leopard, it's actually not necessary to have the J.E.P. plugin enabled. In fact Firefox prefers this plugin over the official Sun Java Applet Plugin v2 wich offers improved load times, browser integration, stability, etc.

After I removed both plugins, Firefox was loading applets incredibly fast, near Flash load time performance. The applets don't flicker anymore when scrolling and so far haven't crashed on me.

To remove the unnecessary plugins you should remove both the files MRJPlugin.plugin and JavaEmbeddingPlugin.bundle from /Applications/Firefox.app/Contents/MacOS/Plugins .
To open the Firefox.app bundle in Finder you need to Ctrl+Click and choose Show Package Contents.

I hope this improves your JavaFX experience...