jpackage current status

Michael Hall mik3hall at
Mon Feb 24 16:23:25 UTC 2020

> On Feb 22, 2020, at 7:02 PM, Michael Hall <mik3hall at> wrote:
> Currently, at least for Runtime exec including the commands with the application does no good.

Just to check would this be known expected behavior?
Or a known issue?
Or something that should have a bug report filed against it?

I additionally looked at using ToolProvider with jpackage as it is indicated to support that but it does not appear to work either at this time.
This can be verified independently of my application. I’m not real familiar but based on a googled example.

import java.util.spi.ToolProvider;

public class ToolProviderTest {

	public static void main(String[] args) {
		ToolProvider tool = ToolProvider.findFirst(args[0])
			.orElseThrow(() -> new IllegalStateException("can not find tool " + args[0]));
		System.out.println("tool " + tool);		


(base) Michaels-MBP:~ mjh$ java -cp . ToolProviderTest jlink
tool$JlinkToolProvider at 1f32e575
(base) Michaels-MBP:~ mjh$ java -cp . ToolProviderTest jar
tool at 2a84aee7
(base) Michaels-MBP:~ mjh$ java -cp . ToolProviderTest jpackage
Exception in thread "main" java.lang.IllegalStateException: can not find tool jpackage
	at ToolProviderTest.lambda$main$0(
	at java.base/java.util.Optional.orElseThrow(
	at ToolProviderTest.main(
(base) Michaels-MBP:~ mjh$ java --list-modules | grep jpackage
jdk.incubator.jpackage at 14

Probably due to jpackage incubator status? But for now programmatic testing of jpackage does not seem possible.

More information about the core-libs-dev mailing list