How to write the JavaScript function to check the version of JRE

advertisements

I am new to JavaScript. How to write JavaScript function which will return installed Java version in the computer.

Thanks
Sunil Kumar Sahoo


use the JNLP, the Sun Unified Deployment Mechanism, the getJREs() function is your answer:

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

NB

it works in a consistent fashion across various browsers