In Firefox 16, java can no longer be accessed using the global instance as per https://bugzilla.mozilla.org/show_bug.cgi?id=748343.
I have built a custom selenium-ide.xpi (http://seleniumhq.org/download/) which loads up java and runs through my custom framework. To access java I added an addJava.js file, which I included in the selenium-ide-common.xul file calling the java using something like what is found at https://developer.mozilla.org/en-US/docs/Java_in_Firefox_Extensions, however this no longer works.
I've tried the following to fix the issue:
Adding the below to the various .xul files, but each time I try the below I get that appletRef is null:
<div name="appletDiv">
<embed id ="cipherDocsApplet" type="application/x-java-applet;version=1.6" code="java.applet.Applet" pluginspage="http://java.com/download/" MAYSCRIPT="true" width="0" height="0" />
</div>
var appletRef = document.getElementById("cipherDocsApplet");
window.java = appletRef.Packages.java;
The below gives me java_instance.Packages is undefined.
var java_instance = window.document.createElementNS("http://www.w3.org/1999/xhtml","applet");
java_instance.setAttribute("id", "adsfund_java_instance");
java_instance.setAttribute("code", "java.applet.Applet");
java_instance.setAttribute("width", "0");
java_instance.setAttribute("height", "0");
java_instance.setAttribute("flex", "1");
var div = window.document.createElementNS("http://www.w3.org/1999/xhtml","div");
var elementToAppendTo = window.document.getElementsByTagName("vbox")[0];
elementToAppendTo.appendChild(div);
div.appendChild(java_instance);
var date = new java_instance.Packages.java.util.Date();
Finally I tried https://bug748343.bugzilla.mozilla.org/attachment.cgi?id=655062, adding the app element to my main xul file and getting it later, but that also gives me the same error: 'TypetError:app.Packages is undefined.'
Does anyone know how to fix this?
Thanks in advance, James