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

different behavior when --name option not used

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • internal
    • internal
    • tools

      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.

            herrick Andy Herrick (Inactive)
            herrick Andy Herrick (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: