<html>
<head>

<script language="javascript" type="text/javascript">

 try{
    var system = java.lang.System;
    alert("os_name="+system.getProperty("os.name"));
    alert("os_version="+system.getProperty("os.version"));
    alert("os_arch="+system.getProperty("os.arch"));
    alert("java_version="+system.getProperty("java.version"));
    alert("java_class_version="+system.getProperty("java.class.version"));
    alert("java_vendor="+system.getProperty("java.vendor"));
 }catch(e){
	alert("You're using browser that fails to offer information about Java.");
 }
</script>

</head>
<body>
The Javascript in this document should tell you about your Java installation. Unfortunately, Microsoft would rather you didn't know, so these functions won't work in their browsers.
</body>
</html>

Notes: The try{ }catch(err){ } technique used here is cross-platform compatible and it will let you trap errors that occur in a particular section of code.  The "err" variable is a textual description of what went wrong.  The java.lang.System object is part of the Java library, and is therefore a way of bridging Java and Javascript.   This synthesis has never really flourished, largely due to Microsoft's resistance.  There is another Javascript technique for detecting Java's presence in the navigator object.  That is a boolean response from the method: navigator.javaEnabled().  This, too, however, is unevenly implemented.  It fails in several prominent OSX browsers, for example.