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

Answer: 
Check out the code in the [Java Deployment Toolkit](http://docs.oracle.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html#deplToolkit).
The detection logic does not work in IE32 on Windows7-64. It could not detect the java version it installed earlier. 

Well, after further reading, the Java Deployment Toolkit on Windows uses ActiveX classid which may pose your app to hackers (see <http://www.kb.cert.org/vuls/id/886582>). I am out.