JDK-8218055 : Use ToolProvider instead of AppRuntimeImageBuilder.
  • Type: Enhancement
  • Component: tools
  • Sub-Component: jpackage
  • Affected Version: internal
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-01-30
  • Updated: 2019-03-22
  • Resolved: 2019-02-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
internalFixed
Related Reports
Relates :  
Relates :  
Description
jpackage uses jdk.tools.jlink.internal.packager.AppRuntimeImageBuilder class when linking a modular image.
We can remove this dependence by using ToolProvider API
to invoke jlink with --add-modules <root-modules> --bind-services.
Comments
default jlink args will include "--strip-debug" "--no-header-files" "--bind-services" "--exclude-files '.*\.diz'" and "--strip-native-commands" only if that arg is passed to jpackage until and unless we implement JDK-8219536
22-02-2019

We are adding --strip-debug and --no-header-files all the time. Shouldn't we leave the header files in in case of building jre-installers or even all the time ? what about --strip-debug - is there any case where we want to exclude this arg ? might they both be candidates for JDK-8219536
21-02-2019

1.) should we remove src/jdk.jlink/share/classes/jpackager/AppRuntimeImageBuilder.java ? 2.) should we add option to allow user to add arbitrary jlink options ? 3.) should we add --bind-services by default ?
20-02-2019

webrev at: http://cr.openjdk.java.net/~herrick/8218055/
20-02-2019

We are only using AppRuntimeImageBuilder when building modular application and not using --runtime-image option. I don't think this helps us when using --runtime-image option. Currently we are using all modules in the given runtime-image. To change that wouldn't we have to invoke the jlink from the given runtime image (if it has one).
30-01-2019