@barret55][/url: yes, it opens too, but I figured it's a decent tradeoff.
But I just tried and put in a sleep, then quit System Preferences into the script and it seems to kill the System Prefs while leaving open the Java Pane.
To use applets on a web page, click on the region labeled "Missing plug-in" to go download the latest version of the Java applet plug-in from Oracle.
Looks like Oracle's version of java uses the Sparkle framework, which is a software update framework used by many Mac applications.
I haven't been able to find anything useful online to access Sparkle via command line.
Updating Java won’t fix the problem because you will just have Java 8.
You can download the Java 6 here: You must click on the download link and a DMG containing the Java 6 installer is downloaded.