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

jlink created runtime hangs on windows when add-options is used

    XMLWordPrintable

Details

    • generic
    • windows_10

    Description

      A DESCRIPTION OF THE PROBLEM :
      When I create a runtime using

      > C:\oracle\jdk-11.0.15\bin\jlink --add-modules ALL-MODULE-PATH --output jre --strip-debug --no-man-pages --no-header-files --compress=2 --module-path "C:\oracle\jdk-11.0.15\jmods" --output compressedrt --add-options="-Xmx64m"

      and try to execute

      > compressedrt\bin\java.exe -version

      it simply hangs

      It only happens when add-options option is used

      Newer versions of JDK create a working runtime
      > C:\oracle\jdk-17.0.3.1\bin\jlink --add-modules ALL-MODULE-PATH --output jre --strip-debug --no-man-pages --no-header-files --compress=2 --module-path "C:\oracle\jdk-17.0.3.1\jmods" --output compressedrt --add-options="-Xmx64m"

      So, I guess, the issue was fixed but not backported?
      Unfortunately I could find a related issue in JBS

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      > C:\oracle\jdk-11.0.15\bin\jlink --add-modules ALL-MODULE-PATH --output jre --strip-debug --no-man-pages --no-header-files --compress=2 --module-path "C:\oracle\jdk-11.0.15\jmods" --output compressedrt --add-options="-Xmx64m"

      and try to execute

      > compressedrt\bin\java.exe -version


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      java doesn't hang
      ACTUAL -
      java hangs

      Attachments

        Activity

          People

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: