Uncaught exception: target applet or JVM process terminated unexpectedly - from Firefox extension

I wrote a Firefox extension. When a menu item is selected, it checks the version of Java. I get this exception when I try to call a Java class inside JavaScript:

uncaught exception: target applet or JVM process terminated unexpectedly

This happens after hibernating my system, if I try to use the Firefox extension, then I get this error. If I restart Firefox, it works again. What can i do with this?

Sample code for the Firefox extension ( overlay.xul ):

 <?xml version="1.0"?> <overlay id="RefMArc-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script> function onRclick_temp() { try { //chkJava: java.lang.String; var vers = java.lang.System.getProperty("java.version"); var ind1 = vers.indexOf(".")+1; vers = vers.substring(ind1, vers.indexOf(".", ind1)); if( vers < 5 ) { alert("You need to upgrade java"); return; } // to do } catch(e) { alert("error:" + e); } } <menupopup id="menu_ToolsPopup"> <menuitem id="helloworld-hello" label="helloworld" oncommand="onMenuClick();" class="menuitem-iconic"/> </menupopup> </toolbox> </overlay> 
+1
java firefox-addon xul
source share

No one has answered this question yet.

See similar questions:

7
The target applet or JVM process terminated unexpectedly

or similar:

36
Access Drive with Firefox Extension
7
The target applet or JVM process terminated unexpectedly
5
Get browser version from Firefox Extension
3
An easy way to extend Mozilla Firefox with the Google Chrome extension
2
Access iFrame dom from Firefox extension
one
How to stop Firefox from loading and applying CSS through the Firefox extension?
one
nsIAlertsService from Firefox extension
0
Overlay browser preferences on the Firefox extension
0
Passing an object from a loaded script to a Firefox extension
0
Handling heavy operations in the background in Firefox extensions

All Articles