Use deployJava.js to check for/automatically install latest JRE version for web applet

Posted by Pryo on Stack Overflow See other posts from Stack Overflow or by Pryo
Published on 2012-04-13T19:05:55Z Indexed on 2012/04/14 17:29 UTC
Read the original article Hit count: 206

Filed under:
|
|
|
|

I'd like to use the deployJava.js tool to have Java automatically detect the currently installed JRE and install an updated version if necessary. My initial impression when reading about deployJava.js was that it would do this out of the box when you simply set a version number as a function parameter for the "runApplet" function. But this has never seemed to work.

Is it even possible to do this, and if so, how?

Here is my current code for launching my applet:

<script type="text/javascript" src="https://www.java.com/js/deployJava.js"></script>
<script type="text/javascript">
    var attributes = {id:"applet", name:"TheApplet", code:"TheApplet"}; 
    var parameters = {jnlp_href: "http://localhost/TheApplet.jnlp"};
    deployJava.runApplet(attributes, parameters, "1.6.0_31");
</script>

Thanks

© Stack Overflow or respective owner

Related posts about java

Related posts about applet