This works on chrome canary/firefox 4 etc on windows:
getAppletContext().showDocument(new URL("javascript:alert('hello');"));
but on firefox 4 ubuntu it does nothing but throw java.net.MalformedURLException: unknown protocol: javascript
It does not throw this exception on Windows.
Any ideas on how to make this work? Even ignoring the exception using the first answer from Calling JS from Applet: MalformedURLException: unknown protocol: javascript the javascript does not run