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

jpackage looks for main module in current dir when there is no module-path

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 15, 16, 17
    • Fix Version/s: 17
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b13
    • CPU:
      generic
    • OS:
      generic

      Description

      When the main module is in the given --runtime-image, so no --module-path option is used even though --module option is used, LauncherData.createModule() will call a ModuleFinder with a path such as [, runtime\lib]
      The empty string followed by comma causes ModuleFinder to look in the current dir.
      If there is a non-modular jar in the current directory, (such as hello.jar) you can get an exception:
      jdk.jpackage.internal.ConfigException: java.lang.module.FindException: Unable to derive module descriptor for hello.jar

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              herrick Andy Herrick
              Reporter:
              herrick Andy Herrick
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: