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>
var JavaVersion = PluginDetect.getVersion('Java', 'getJavaInfo.jar');
var Java0Status = PluginDetect.isMinVersion('Java', '0', 'getJavaInfo.jar');
alert('Java version is ' + JavaVersion + '\n' + 'Java status is ' + Java0Status);
This is the plugin detect generator page, also you can check here for detail about that.
You can use the deployJava.getJREs()
method in the Deployment System (returns a list of currently installed JREs).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With