I am trying to use the deployJava script from Oracle to check the installed java version. It works fine on FireFox but fails in Chrome, as when i test java version 1.6 it always returns false which means i have a java version below 1.6, which is not right. I've seen some forums mentioning this problem, but i have found no fix for this until now.
Anyone has checked this script before ?
---------------------------------------------------> Edit - Add a code sample :
var isJavaValid = deployJava.versionCheck( '1.6.0+' );
if( isJavaValid == false ) {
   alert( "Java required version is not found" );  // Always appears.
}
else {
   alert( "You have the right java v开发者_如何学运维ersion." );
}
This works for me:
<html>
<head>
<script type="text/javascript" src="http://java.com/js/deployJava.js"></script>
<script type="text/javascript">
function init()
{
var isJavaValid = deployJava.versionCheck( "1.6.0+" );
if( isJavaValid == false ) {
   alert( "Java required version is not found" );  // Always appears.
}
else {
   alert( "You have the right java version." );
}
}
</script>
</head>
<body onload="init()">
</body>
</html>
Test here: http://jsbin.com/ikiza4
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论