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

dtjava.js jvm version check incorrect

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 8
    • Fix Version/s: None
    • Component/s: deploy
    • Labels:

      Description

      FULL PRODUCT VERSION :
      -

      ADDITIONAL OS VERSION INFORMATION :
      Bug tested on Windows 7, but not specific to any OS

      A DESCRIPTION OF THE PROBLEM :
      When deploying a Java applet via the dtjava.js (http://java.com/js/dtjava.js) script we use dtjava.validate(Platform) to validate if the user's system has the correct java version installed.
      In our case atleast java 8.0. However the current dtjava.js validate(Platform) method always returns "null" and thus indicating that the user's system has the required version even though he has version 7.0.

      After checking the non-compressed version of dtjava.js here: https://bitbucket.org/openjfxmirrors/openjfx-8-master-rt/src/2872be3a2984e57762b4d86a0465603bf2465bf5/modules/fxpackager/src/main/resources/resources/web-files/dtjava.js?at=default

      I noticed that on line 1043: "} else if (qArr[idx] < vArr[idx]) {"
      should be: "} else if (qArr[idx] > vArr[idx]) {"

      When changing this the issue was resolved and version checking works correct.

      REGRESSION. Last worked in version 8

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create a website with the following script: dtjava.validate(new dtjava.Platform({ jvm: "8.0"})) and run if from a browser with a Java 7 plugin.




      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The validate(Platform) method should return a error message that tha java verion is too low.
      ACTUAL -
      The validate(Platform) method returns "null" (meaning correct)

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Javascript code:

      <SCRIPT src="http://java.com/js/dtjava.js"></SCRIPT>

      <script>
      var javaVersion = '1.8+';
      var fxVersion = '8+';
      var platform = new dtjava.Platform({ javafx: fxVersion, jvm: javaVersion });
      var result = dtjava.validate(platform);
      </script>
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Using the dtjava.js version from https://bitbucket.org/openjfxmirrors/openjfx-8-master-rt/src/2872be3a2984e57762b4d86a0465603bf2465bf5/modules/fxpackager/src/main/resources/resources/web-files/dtjava.js?at=default

      And changing line 1043 from: "} else if (qArr[idx] < vArr[idx]) {" to: "} else if (qArr[idx] > vArr[idx]) {"

      SUPPORT :
      YES

        Attachments

          Activity

            People

            Assignee:
            almatvee Alexander Matveev
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: