(Safari 3.1.525.9) In JS with Java installed, you should be able to get the Java version by doing: alert(java.lang.System.getProperty("java.version")); This fails because 'java' is not exposed to js. Works fine in Opera and FF.
It's by design. You cannot call Java directly from javascript. First you should create an applet on the page. After that you can use LiveConnect to call methods from the applet using JavaScript. This *proper* method works fine in Webkit. Check this page to read how to do it: http://www.whatscookin.com/staff/mattd/articles/jre-detection.html
Thanks. I was referring to < http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Packages > and < http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:java >. For example: <script> (function() { var theOwner = new java.awt.Frame(); var theWindow = new java.awt.Dialog(theOwner); theWindow.setSize(350, 200); theWindow.setTitle("Hello from Opera and Firefox"); theWindow.setVisible(true); theWindow.show(true); setTimeout(function() { theWindow.dispose(); }, 5000); })(); </script> (In reply to comment #1) > It's by design. O.K., this is invalid then.
*** This bug has been marked as a duplicate of bug 15109 ***