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

Answer: 
Version of Java:

> 
> 
> ```
> /**
>  * @return NULL if not version found. Else return some things like: '1.6.0_31'
>  */
> var JavaVersion: function()
> {
>   var result = null;
>   // Walk through the full list of mime types.
>   for( var i=0,size=navigator.mimeTypes.length; i<size; i++ )
>   {
>       // The jpi-version is the plug-in version.  This is the best
>       // version to use.
>       if( (result = navigator.mimeTypes[i].type.match(/^application\/x-java-applet;jpi-version=(.*)$/)) !== null )
>           return result[1];
>   }
>   return null;
> }
> 
> ```
> 
> 

Is Java and is Java enable:

> 
> 
> ```
> var IsJava: function()
> {
>   return typeof(navigator.javaEnabled) !== 'undefined' && navigator.javaEnabled();
> }
> 
> ```
> 
> 

These functions works on Opera, Firefox, Chrome. I havn't IE.
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).