I'm experiencing the same bug: JSObject.getWindow(this) returns 'null'. This seems to be a problem related to http://localhost though. When I run the same code on a different domain (editing the /private/etc/hosts file), it works.
Hi, I can confirm that accessing it on a different domain gives me the window object. However, this just seems to move problem, the next call JSObject jsDoc = (JSObject) win.getMember("document"); then returns null. And it still seems to be restricted to the Firefox/Mac OS X version.
Hmm, if I browse to http://browserspy.dk/java.php first, I see the following appear in the Java console. <<< ProxyClassLoader: defined LiveConnectProxy class. >>> My applet then works as long as the FF/JVM instance is running. I see a ProxyClassLoader each time an applet is started. It stops working after FF instance is closed. Works again once I hit the magic page. Something kicks in the LiveConnectProxy, not sure what it is. Anyone else confirm?
I have an online demo of the original bug here: http://jnlp.dev.concord.org/test-japplet.html
I've added a bug report at the sourceforge tracker for the Java Plugin Project: http://sourceforge.net/tracker/?group_id=107955&atid=649116 Looking at the changesets in the source as FireFox progressed from 3.6.10 to 3.6.11 this one by Steven Michaud on Sep 24, 2010 stands out: Bug 598453 - r=josh a18.104.22.168=clegnitto. http://hg.mozilla.org/releases/mozilla-1.9.2/rev/06dbab839a94 The commit log message is obscure but the commit bumps these two artifacts from the Java Plugin Project (http://javaplugin.sourceforge.net/Readme.html): Java Embedding Plugin MRJ Plugin 1.0-JEP from version 0.9.7.3 to 0.9.7.4. Unfortunately the latest commit to the sourceforge CVS repository is from Mar 09 2010 and is for the v0.9.7.3 release. In addition the content on the page with Mozilla Bug 598453 is not visible to unauthorized developers. This makes me wonder if the update was a security fix.
Hey, that worked, thanks for the suggestion! I have an online demo of the work-around here: http://jnlp.dev.concord.org/test-japplet2.html. The page displays the Java code used to implement the work-around. It displays the result of the JSObject.getWindow call back in the browser. It works in FireFox 3.6.12 on the Mac. The actual communication back to the browser doesn't complete successfully in Safari or Chrome on the Mac -- but that is a different problem.
Here's a test build made with my current patch for bug 610525. Please try it and let us know your results. http://people.mozilla.com/~stmichaud/bmo/firefox-3.6.13pre-bugzilla610525.en-US.mac.dmg
The Namroko bulid works fine with my test of the original bug: http://jnlp.dev.concord.org/test-japplet.html It also works with my test of a work-around. http://jnlp.dev.concord.org/test-japplet2.html Unfortunately it now generates the same security-related problem that Safari has with my actual application which is demoed here: http://jnlp.dev.concord.org/goio-temperature-graph.html That particular program reads sensor data from a Vernier GoIO Temperature probe -- and the bug won't show up unless you have one plugged in. Here's the line that throws the error: https://github.com/concord-consortium/sensor-applets/blob/get-nar-as-resource/src/main/java/org/concord/sensor/applet/OTSensorApplet.java#L207 The Java console output is here: https://gist.github.com/670608 I'll try and put together a simpler case which causes the problem. The temperature graphing app now works in FireFox 3.6.12 and Chrome and all the browsers I've tested on Windows.
> The Namroko bulid works fine with my test of the original bug: > > http://jnlp.dev.concord.org/test-japplet.html > > It also works with my test of a work-around. > > http://jnlp.dev.concord.org/test-japplet2.html Glad to hear it! > Unfortunately it now generates the same security-related problem > that Safari has with my actual application which is demoed here: > > http://jnlp.dev.concord.org/goio-temperature-graph.html > > That particular program reads sensor data from a Vernier GoIO > Temperature probe -- and the bug won't show up unless you have one > plugged in. This might be a bug in Apple's implementation of Sun/Oracle's JVM. > I'll try and put together a simpler case which causes the problem. Please do. I don't have a Vernier GoIO Temperature probe, and I doubt any other Mozilla developers have one, either :-) When you do, please open a new bug.
My sensor applet application now works with the Namroko build (and Safari) -- it was a problem on my end. However my sensor applet AND my second JApplet test (http://jnlp.dev.concord.org/test-japplet2.html) does NOT work on FireFox 4_b7 -- I've made a new issue: Bug 611183
This bug should now be fixed on the 1.9.2 and 1.9.1 branches by my patch for bug 610525, which landed yesterday on those branches. Please check out the latest nightlies on those branches. It's not yet fixed on the 1.9.0 branch (used by Camino 2.0.X). But it should be once I get permission to land my fix for bug 610525 on the 1.9.0 branch.
Apparently, this is a duplicate of bug 606737, but it's still happening for me in 3.6.13 (working perfectly in Safari and Chrome), so I don't think this is working as it should yet.
Sorry, don't know what happened here, that comment was for another bug :?? (although it's still true that this isn't working for me, yet)
Ángel, please open a new bug on your problem, and CC me on it. Be sure to include a test applet (with source code), and the html code you use to load it. Quite apparently your bug is different from this one (bug 606737), which has now been fixed. And there isn't enough information to say whether or not bug 608901 and bug 614282 are dups of this bug (and therefore also fixed). So the best way to cut through the confusion is for you to open a new bug..