I will get right to the point. There is no accurate way using Javascript to detect if  a Java Virtual Machine exists in the client’s machine. While existing Javascript functions may work in some browsers, it does not in some. Luckily, after Oracle bought Java, they made a small Javascript code that can do just that.

Search Google with the keyword deployJava.js and you will find a search result with the label Java™ Rich Internet Applications Deployment Advice.

The page includes short descriptions on available functions to use and code snippets on how to incorporate the Javascript code with yours. Using it is pretty easy. Just import the Javsacript file deployJava.js

You can do a simple version check if a Java Virtual Machine exists in the client’s machine with version 1.6.

This code typically redirects the user viewing the page to the Java JVM installation site in case no JVM is detected. Pretty easy right?

Related Posts Plugin for WordPress, Blogger...