> On Jan 15, 2019, at 12:48 PM, Rachel Greenham <rac...@strangenoises.org> 
> wrote:
> 
> On 15/01/2019 17:36, Michael Hall wrote:
>>> On Jan 15, 2019, at 10:55 AM, Rachel Greenham <rac...@strangenoises.org> 
>>> wrote:
>>> 
>>> My understanding was that this particular jdk build only exists for the 
>>> sake of getting jpackage out there into our hands (hence my point about 
>>> putting it out as a jlinked app instead),
>> True, which is a little different in and of itself, providing a JDK for a 
>> single command. I’m not that familiar yet with what jlink can do. How would 
>> it’s being a launchable app help in testing a command line tool? Is there 
>> some new magic way I haven’t heard of yet that jlink provides so that 
>> invoking something command line launches an app with the enclosing JDK?
> 
> you could create the jlinked app from the jdk they provide, something like 
> (using the jlink in that jdk):
> 
> jlink --add-modules jdk.jpackage --output jpackage
> 
> This gives you a trimmed-down jre with just the modules that jdk.jpackage 
> depends on. In bin is a jpackage executable. So you'd call 
> jpackage/bin/jpackage <opts>. There's a bunch of other executables there 
> (including java and javac) but they're only there because they belong in 
> dependent modules.
> 
> Assuming it has everything it needs, it would probably be functionally the 
> same to use that or to use the jpackage in that jdk, but it's a third of the 
> size, and providing it in that manner may better communicate that that's all 
> that it's for, and not to try to use it as a complete jdk in its own right. I 
> imagine you could also just remove the other binaries in bin so it could be 
> safely added to your PATH and not be interfering with your using jdk.
> 
> Caveat: I haven't tested any of that, except the jlink itself, and seeing the 
> resulting jpackage give me its --help output. :-) Just explaining what jlink 
> is for in this context.
> 
> -- 
> Rachel

Thanks for the answer. I still have to do more with these tools including jlink 
myself.

Mike Hall

Reply via email to