Further comments on jpackage (JEP 343)

Andy Herrick andy.herrick at oracle.com
Tue Nov 5 17:46:36 UTC 2019


The three suggestions below are captured in the 3 enhancements:

JDK-8233594 <https://bugs.openjdk.java.net/browse/JDK-8233594> , 
JDK-8233592 <https://bugs.openjdk.java.net/browse/JDK-8233592> , and 
JDK-8233591 <https://bugs.openjdk.java.net/browse/JDK-8233591>

I should be able to have these three changes implemented, reviewed, and 
integrated by the end of this week or early next week at the latest.

/Andy


On 11/4/2019 7:25 PM, mark.reinhold at oracle.com wrote:
> Today I took the jpackage tool for another spin, using build
> 14-jpackage+1-64 from https://jdk.java.net/jpackage.
>
> This looks much better!  The simple command line
>
>    $ jpackage -p lib -m org.openjdk.hello -n hello
>
> did exactly what I expected, and the resulting package installed (and
> uninstalled) cleanly on an Ubuntu 18.04 machine.
>
> A few suggestions:
>
>    - The image for the above example is large for such a trivial
>      application (122MB).  That’s because you invoke the jlink tool with
>      the `--bind-services` option.  To avoid surprise I suggest that you
>      not do that by default, and add a `--bind-services` option to
>      jpackage that’s just passed through to jlink (like `--add-modules`).
>      That will make jpackage work in the same way as jlink in this regard,
>      further reducing confusion.
>
>    - The sample usages in the help output are overly focused on
>      application images.  I suspect that most developers will want to
>      start by creating actual packages, so consider reordering the
>      examples to put application packages first, followed by application
>      images and then runtime images.  You could simplify these first
>      examples further by removing the `--package-type <type>` and
>      describing them as “Generate an application package suitable for
>      the host system”.
>
>    - Consider renaming the `--package-type` option to `--type`, with a
>      short-form option `-t`.
>
> - Mark


More information about the core-libs-dev mailing list