Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8123388

A bug in dtjava.js jreInstallerURL function

XMLWordPrintable

        Original issue is JDK-8015067.

        FULL PRODUCT VERSION :
        N/A

        A DESCRIPTION OF THE PROBLEM :
        While using the official release of dtjava (http://www.java.com/js/dtjava.js), Platform.jreStatus() returns " none " but at the same time Platform.jreInstallerURL() returns null. Upon reading source at http://hg.openjdk.java.net/openjfx/8/controls/rt/file/tip/deploy/javafx-deploy/src/js/dtjava.js I found this is due to line 352:

        if (this.os && (this.jre == " old " || this.jre == " none " )) {

        which should be:

        if (!this.os && (this.jre == " old " || this.jre == " none " )) {

        Applying this fix produces expected behaviour

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Visit this web page on any system without Java:

        <head><html>
        <script src= " http://www.java.com/js/dtjava.js " ></script>
        <script>
        (function()
        {
        var validErr = dtjava.validate(dtjava.Platform({jvm: " 1.7.0+ " , javafx: " 2.1+ " }));
        console.log(validErr.jreStatus());
        console.log(validErr.jreInstallerURL());
        })();
        </script>
        </head>
        <body>
        </body>
        </html>


        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        none
        http://jdl.sun.com/webapps/getjava/BrowserRedirect?host=java.com&locale=en
        ACTUAL -
        none
        null

        REPRODUCIBILITY :
        This bug can be reproduced always.

        CUSTOMER SUBMITTED WORKAROUND :
        Use a local version with the " patch " applied by hand.

              dtitov Daniil Titov (Inactive)
              dtitov Daniil Titov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported: