Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is plugin.jar for Java 7 for OSX

If you're using Java < 1.7 on OS X and you need to use JSObject for connecting an applet to JavaScript, you can find it in in $JAVA_HOME/jre/lib/plugin.jar.

The "plugin.jar" archive doesn't seem to exist on Java 1.7 for OS X (as packaged by Oracle). There is a jfxrt.jar that seems to contain JSObject, but that unfortunately means that you can't use the same plugin.jar that you can on almost any other JDK, including 7u5 for Linux, which still has plugin.jar built right in.

In particular, this gets irritating if you're trying to use it as a compilation dependency for a build tool such as Maven, which you could otherwise do with a JAVA_HOME-relative path.

like image 209
Geoffrey Wiseman Avatar asked Nov 16 '25 13:11

Geoffrey Wiseman


2 Answers

Java 7 on Mac OS X doesn't support the Java plugin. So, plugin.jar is simply not there. If you manage to find the Java 7 installation guide for Mac OS X on Oracle's website (good luck with that) you'll see:

Note that for the 7u4 release, Java plugin and Java Web start applications are not supported.

And, yes, 7u5 is out, but its release notes say it's just a bug and security fix. I'm assuming Oracle just didn't bother to update their installation notes. It looks like the 7u6 developer preview does include the plugin, so at least it's on its way.

The jfxrt.jar file is for Java FX, which is included in the Oracle Java 7 Mac OS X release. Of course, Java FX is built on top of Java applets and is intended to run via the Java plugin, so don't ask me why it would be included in Oracle's Mac OS X Java 7 release while the Java plugin itself isn't. (I guess you can build Java FX apps, you just can't run them?)

The real answer appears to be "don't use Java 7 on Mac OS X quite yet." Which may be one of the reasons Oracle extended the Java 6 EOL until November.

like image 176
Xenoveritas Avatar answered Nov 18 '25 04:11

Xenoveritas


Plugin.jar is available on Java 7u6 for OS X, now available.

like image 22
Geoffrey Wiseman Avatar answered Nov 18 '25 03:11

Geoffrey Wiseman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!