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

Modular jars in jpackage are not working

    Details

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

      Description

      review feedback:
      ------------------------
      6. Generate an application image from a non-modular JAR file

      I think this means to say "Create a non-modular application image"

      When I run it, it does fail and does not accept modular JAR files.

      $ jpackage create-image --input dist --main-jar hi.jar -n Hello --output myapp1 --force
      Exception: java.lang.Exception: Error: Modules are not allowed in srcfiles: [dist/hi.jar, dist/lib/lib.jar].
      Error: Bundler "Mac Application Image" (mac.app) failed to produce a bundle.

      A modular JAR can run on the class path as a non-modular app. This seems very restrictive. I would expect we should support it as libraries should migrate to a modular JAR in order to run on 8u and new releases as modules.
      -----------------------------------

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: