3 Replies Latest reply on Jan 15, 2013 5:16 PM by Chris Newland

    deployJava.js fails to install Java when no Java is present

    Chris Newland
      In 7u11 in response to the latest zeroday hole in the applet sandbox, Oracle took the decision to display a warning popup on all unsigned or self-signed applets. This is really bad news for us and our 3 million (yes really) applet users as our previous applet loader used a single unsigned class to bootstrap a signed jar so now I have to rewrite the loader.

      I ripped out the single loader class and decided to use the latest deployJava.js which works nicely starting the applet when Java 7u11 is already installed but testing it when Java is not installed I get the following behaviour:

      Windows XP SP3 Firefox 18 : Installer runs but page refreshes in background every second (looks terrible) and when the installer completes the page shows a grey box with "A plugin is needed". Refreshing or restarting the browser fixes this but why does it refresh when not needed and then fail to refresh the one time it is needed?

      Windows XP SP3 Chrome 24.0.1312.52m : Same problem as Firefox but error message is "Java is required to run this content". Refreshing fixes.

      Windows XP SP3 Internet Explorer 8.0.6001.18702 (latest): Same annoying 1 second refresh of the page in the background and finally get the message "Install failed" and redirect to an Oracle help page. Retried multiple times and made sure no remants of Java lying around.

      Anyone else have problems with deployJava.js installing Java when no Java is present?
        • 1. Re: deployJava.js fails to install Java when no Java is present
          you're having issues in your own environment it seems. What if you use java.com where the deployjava script is also used; do you have the same issues there?
          • 2. Re: deployJava.js fails to install Java when no Java is present
            Chris Newland
            Hi gimbal2,

            By uninstalling Java from the Control Panel and then manually cleaning up the registry and filesystem I managed to get deployJava.js to install on IE8 now. Thank you.

            I now have the same problem on all 3 browsers (Firefox, Chrome, IE8) in that the installer takes 2-3 minutes to run, all the time our webpage is being refreshed by deployJava.js every second which looks terrible.

            Finally, when the Java installer completes, it fails to perform the final refresh so on FF/Chrome I'm left with a grey box "A plugin is needed" or on IE8 a white box with the red X icon.

            We have over 3 million users on our website and use applets for streaming stock price data. Yesterday when the default applet security setting in 7u11 was upped to high our users started getting the warning dialog about an unsigned class we use for Java detection and bootstrapping (fair enough).

            The deployJava.js solution now works but looks terrible and leaves the user uncertain as to whether Java installed successfully.

            I'll try and modify deployJava.js to reduce the refreshes and make the final refresh work and post findings here if successful.
            • 3. Re: deployJava.js fails to install Java when no Java is present
              Chris Newland
              This solution works for me: http://stackoverflow.com/questions/10146836/use-deployjava-js-to-check-for-automatically-install-latest-jre-version-for-web.

              Using deployJava.versionCheck() I can catch out of date or missing Java and redirect the browser to the Java download page. Not as smooth as having it download in a popup but the 1 second browser refresh is horrible and users would complain.

              <script type="text/javascript" src="https://www.java.com/js/deployJava.js"></script>
              <script type="text/javascript">
              if (deployJava.versionCheck("1.6.0_31+") == false) {                  
              userInput = confirm(
              "You need the latest Java(TM) Runtime Environment. " +
              "Would you like to update now?");
              if (userInput == true) { 
              window.location = "http://java.com/";
              var attributes = {id:"applet", name:"TheApplet", code:"TheApplet"};
              var parameters = {jnlp_href: "http://localhost/TheApplet.jnlp"};
              deployJava.runApplet(attributes, parameters, "1.6.0_31");