JDK-8233594 : create a new option --bind-services to pass on to jlink
  • Type: Enhancement
  • Component: tools
  • Sub-Component: jpackage
  • Affected Version: internal
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-11-05
  • Updated: 2019-11-13
  • Resolved: 2019-11-09
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
Duplicate :  
Relates :  
Relates :  
Description
Currently, when creating a runtime using jlink, jpackage adds the "--bind-services" option by default unless the --add-modules option is used.

This change will add a --bind-services option to jpackage and otherwise remove that option from the default jlink options.

feedback:
The image for a trivial application is large because jlink tool is invoked 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.

Comments
tested manually - automated test to be separately added. webrev: http://cr.openjdk.java.net/~herrick/8233594/
05-11-2019

Testing this feature can be based on the following idea: by default jpackage should run jlink without `--bind-services`, so running the same jpackage command line plus with `--bind-services` parameter added should produce different runtime. Automated test scenario can be as follows: 1. Run jpackage without `--bind-services` parameter. Save the list of modules in the output runtime. 2. Run jpackage with `--bind-services` parameter. Save the list of modules in the output runtime. 3. Check that the list of modules from step #1 is a subset of the list of modules from step #2.
05-11-2019