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

Modular jars in jpackage are not working

XMLWordPrintable

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

      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.
      -----------------------------------

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

              Created:
              Updated:
              Resolved: