Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-27368

Handle JDK 9+ versions correctly in Nuxeoctl.bat

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 11.1
    • Fix Version/s: 11.x

      Description

      Nuxeo Server requires specific Java versions to running the server. If a Java version is not supported, Nuxeo Launcher will fail the start command and show the following message error:

      Nuxeo requires Java JDK ... (detected ...)

      It worked fine for version prior to Java 9. Since Java 9, the release cycle and version naming has been changed (JEP 223: New Version-String Scheme). The version comparison logic in Nuxeoctl does not cover all cases anymore. The related code in Window Batch script is:

      nuxeoctl.bat
      if %JAVA_VERSION% lss %REQUIRED_JAVA_VERSION% (
        echo Nuxeo requires Java JDK %REQUIRED_JAVA_VERSION_LABEL%+ ^(detected %JAVA_VERSION_LABEL%^)
        timeout /t 30
        goto END
      )
      

      The goal of the ticket:

      1. Ensure Java versions are compared correctly in Nuxeoctl, for both Oracle JDK and Open JDK
      2. Ensure Nuxeoctl Bash script (bin/nuxeoctl) and Nuxeoctl Batch script (bin/nuxeoctl.bat) have the same behaviors in regards to Java version comparison

      Impact of the ticket (if not being handled):

      1. When comparison failed, using Java 11 EA won't work for Nuxeo Server 11.1-SNAPSHOT (CI failure: NXP-27351)
      2. Potential bug in Nuxeoctl for future Java releases, currently "1.8.0_191-b12" => 180 (int), "11.0.2" => 1102 (int), "12+33" => 1233 (int).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mhuang Mincong Huang
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 15 minutes
                  15m

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.