Closed Bug 501855 Opened 16 years ago Closed 16 years ago

LiveConnect Java to Javascript communication is broken

Categories

(Firefox :: General, defect)

3.5 Branch
x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 484744

People

(Reporter: arhipov, Unassigned)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9.1) Gecko/20090624 Firefox/3.5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5 JSObject.getWindow is not working in FireFox 3.5 with Java5. It worked in FireFox 3.1. It is still working in FireFox 3.5 with Java6 new plugin. This issue seems to be Windows-specific (at least there is no such problem in Linux). Reproducible: Always Steps to Reproduce: 1. Open xhtml below 2. Click button Actual Results: java.security.PrivilegedActionException: java.lang.reflect.InvocationTargetException at java.security.AccessController.doPrivileged(Native Method) at sun.plugin.liveconnect.SecureInvocation$2.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.plugin.liveconnect.SecureInvocation.CallMethod(Unknown Source) at sun.plugin.liveconnect.SecureInvocation.access$300(Unknown Source) at sun.plugin.liveconnect.SecureInvocation$CallMethodThread.run(Unknown Source) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.plugin.javascript.invoke.JSInvoke.invoke(Unknown Source) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source) at sun.plugin.liveconnect.PrivilegedCallMethodAction.run(Unknown Source) ... 6 more Caused by: netscape.javascript.JSException at netscape.javascript.JSObject.getWindow(Unknown Source) at TestApplet.test(TestApplet.java:13) ... 16 more Expected Results: Something like: window: [object Window @ 0x87a7368 (native @ 0x87a5b14)] test.xhtml <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Applet test</title> </head> <body> <applet id = "applet1" codebase = "." archive = "applet.jar" code = "TestApplet.class" mayscript = "mayscript" /> <button id="goButton" onclick="document.getElementById('applet1').test();">Click me</button> </body> </html> TestApplet.java import javax.swing.JApplet; import netscape.javascript.JSObject; public class TestApplet extends JApplet { public void test() { JSObject window = JSObject.getWindow(this); System.out.println("window: " + window); } }
Version: unspecified → 3.5 Branch
Boris, could you think of any of people it's worth to cc to this bug?
Johnny and Josh. But this might just be a matter of needing the newer plug-in, as comment 0 says.
Yeah, this is a problem only with the old Java plugin in 3.5, there's a fix in bug 484744 that should be included in 3.5.1.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.