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

modular jar linking in jpackage

    Details

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

      Description

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

      Perhaps it can be rephrased as "Create a modular application image"

      I have trouble in creating an image for modular JAR.

      $ jpackage create-image -p dist/hi.jar:dist/lib/lib.jar -n Hello --output myapp1 --module hi
      Exception: java.lang.NullPointerException
      Error: Bundler "Mac Application Image" (mac.app) failed to produce a bundle.

      jpackage create-image --input dist -p hi.jar:lib/lib.jar -n Hello --output myapp1 --module hi --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.

      Does jpackage use jlink to create a runtime image with the application modules? I suspect not. I guess it will create similar layout as the non-modular app and copy the modular JARs under some app-specific directory. The launcher launches the app with -p and -m option.

      Is there any plan to create an application image same as the modular runtime layout when packaging a modular app? think we should think through this if it's feasible to move to the direction in the future.

      It's important for the JEP to document what in the image layout are public interface and not.
      ---------------------------------------

      Separate bugs should be filed for Sample Usage help text, documentation, and possibly direct usage of jlink instead of using jdk.tools.jlink.internal.packager.AppRuntimeImageBuilder.

        Attachments

          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: