On 11/26/2019 9:48 AM, Michael Hall wrote:
On Nov 25, 2019, at 11:47 AM, Alexey Semenyuk
<alexey.semen...@oracle.com <mailto:alexey.semen...@oracle.com>> wrote:
--name HalfPipe
--runtime-image "c:/Program Files/Java/jdk-14"
--runtime-image and --add-modules parameters should not be used together.
If Java run-time image is specified with --runtime-image parameter,
jpackage will not run jlink command to create custom run-time from
the list of modules specified in --add-modules parameter(s).
So I'd recommend to remove --runtime-image from your input.
Good catch on this one as well. I must have not had it added at some
point so I had the —add-modules. Maybe sometime —runtime-image seemed
to help in running multiple runtimes for the machine and jpackage or
sometime it seemed like a quick fix for a missing modules problem.
There are few scenarios when you would use —runtime-image option:
- you want to bundle your app with different version of Java run-time.
Say, with Java8.
- you have created custom run-time by explicitly running jlink command
and want to bundle this Java run-time with your app. jpackage doesn't
provide full control on parameters passed to jlink command it runs
internally, so if flexibility of jpackage is not sufficient,
—runtime-image option is a workaround.
After networking errors I did have to include jdk.crypto.ec as per…
https://stackoverflow.com/questions/54770538/received-fatal-alert-handshake-failure-in-jlinked-jre
It is not immediately clear to me how I could of anticipated the need
for this module
(base) Michaels-MBP:halfpipe_jpkg mjh$ jdeps
outputdir/HalfPipe.app/Contents/app/halfpipe.jar | grep jdk.crypto.ec
(base) Michaels-MBP:halfpipe_jpkg mjh$ jdeps
outputdir/HalfPipe.app/Contents/app/httpclient.4.5.6.jar | grep
jdk.crypto.ec
(base) Michaels-MBP:halfpipe_jpkg mjh$ jdeps
outputdir/HalfPipe.app/Contents/app/httpcore.4.4.10.jar | grep
jdk.crypto.ec
All show nothing. But the app appears to work fine after adding it.
Before
-rw-r--r--@ 1 mjh staff 107814191 Nov 26 07:37 HalfPipe-1.0.dmg
After
-rw-r--r--@ 1 mjh staff 70825384 Nov 26 07:50 HalfPipe-1.0.dmg
So the application is seeing some benefit from modular on size now.
If some options are more or less mutually exclusive would it be an
idea if jpackage issued some warnings/errors?
Good catch. I've created
https://bugs.openjdk.java.net/browse/JDK-8234867 to track this.
- Alexey