jpackage current status

Andy Herrick andy.herrick at oracle.com
Mon Feb 24 17:12:24 UTC 2020


We have no problem invoking jpackage through the tool provider interface 
in all of our test cases.

In previous emails you described using a hybrid jdk13/jdk14 jdk. Can you 
explain what exactly you are using ?

/Andy


On 2/24/2020 11:23 AM, Michael Hall wrote:
>
>> On Feb 22, 2020, at 7:02 PM, Michael Hall <mik3hall at gmail.com> 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 jdk.tools.jlink.internal.Main$JlinkToolProvider at 1f32e575
> (base) Michaels-MBP:~ mjh$ java -cp . ToolProviderTest jar
> tool sun.tools.jar.JarToolProvider 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(ToolProviderTest.java:8)
> 	at java.base/java.util.Optional.orElseThrow(Optional.java:401)
> 	at ToolProviderTest.main(ToolProviderTest.java:8)
> (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