How to check if a plugin is java enabled or not using javascript?
2 answers
I suggest you refer to the method recommended by Oracle
<script src="http://www.java.com/js/deployJava.js"></script>
<script>
if (deployJava.versionCheck('1.6+')) {
var url = "http://docs.oracle.com/javase/tutorialJWS/deployment/webstart/examples/Notepad.jnlp";
<!-- you can also invoke deployJava.runApplet here -->
deployJava.createWebStartLaunchButton(url, '1.6.0');
} else {
document.location.href="http://oracle.com";
}
</script>
This is taken from http://docs.oracle.com/javase/tutorial/deployment/deploymentInDepth/jreVersionCheck.html
You should also take a look at Java Deployment Toolkit http://docs.oracle.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html#deplToolkit
+3
source to share