Reputation: 49
I am stuck: how to check if a user has a specified java requirement? I need to find ranges (for instance java versions between 1.5.0_10 and 1.6.0_10). I am using javaDeploy.js from Oracle and using the versioncheck method but I can't figure what I need to pass inside the versionCheck method for ranges such as the example I provided.
Upvotes: 1
Views: 211
Reputation: 26005
You could also directly get the java version:
<script src="http://www.java.com/js/deployJava.js"></script>
<script>
var versions = deployJava.getJREs();
alert(versions);
if(versions>= "1.5.0" && versions<= "1.6.1")
alert("correct version");
</script>
Upvotes: 0
Reputation: 50905
Try this:
var lower = deployJava.versionCheck("1.5.0_10+"),
higher = deployJava.versionCheck("1.6.0_10+")
if (lower && !higher) {
// between 1.5.0_10 && 1.6.0_10
}
Reference:
Upvotes: 5