Question: Is there a reliable way of detecting what version of Java is installed on the client's machine using JavaScript?

Answer: 
According to the fact that we're finding this page with google, just to help the next guys finding this.

Is Java installed?
------------------

```
navigator.javaEnabled()

```

<http://www.w3schools.com/jsref/met_nav_javaenabled.asp>

Which version of Java is installed?
-----------------------------------

```
<script src="http://www.java.com/js/deployJava.js"></script>
<script>
var versions = deployJava.getJREs();
</script>

```

<http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html#deplToolkit>

It's the best way I found to find the version of Java with JavaScript, but use it carefully because its version detection is really os/browser dependent, and on old browser version or on recent browser with old Java installed, it'll not work as expected. Take the time to do real tests before to use it in production.
If you use Google Analytics, [this post](http://cowwoc.blogspot.com/2008/12/tracking-java-versions-using-google.html) might be helpful (see the [forum thread](http://forums.java.net/jive/thread.jspa?threadID=53140&tstart=15) for more details).