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

different behavior when --name option not used

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: internal
    • Fix Version/s: internal
    • Component/s: tools
    • Labels:

      Description

      When creating an application image, the --name option is not strictly required, and jpackage will infer the name from the main class.

      If main class is not explicitly given (either by --module/<main-class> for modular app, or --main-class <main-class> for non-modular app), it too can be inferred, either from the --module-path or --main-jar pointing to a jar with a Main-Class manifest attribute.

      However, the combination of both of these do not work, and the command:
      jpackage create-app-image -o output -p input/mjar1.jar -m me.mymodule
      will fail with strange error:
      Error: Application output <...>\output already exists.

      It seems at the point it is creating the output directory "output/<name>" name is null.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: