jpackage ROOTDIR variable in a Windows bat file

Alexey Semenyuk alexey.semenyuk at oracle.com
Mon Nov 25 18:26:52 UTC 2019



On 11/25/2019 1:13 PM, Michael Hall wrote:
>
>>>> --install-dir ./outputdir
>> Are you sure you want your app to be installed in 
>> %ProgramFiles%\outputdir directory?
>
> I need to look at your detailed discussion of this.
--install-dir parameter specifies directory where your app will be 
installed. Its value is interpreted differently on Linux, OSX and Windows.
On Windows the value should be relative path. The absolute installation 
path will be constructed from %ProgramFiles% and the value of 
--install-dir parameter.
If --install-dir parameter is not specified, installation directory will 
be constructed from app name. In your case if --install-dir parameter 
will not be set, the installation directory will be %ProgramFiles%\HalfPipe.

- Alexey

>
>>
>>>>
>>>> --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.
>>
>
> This I didn’t know. I’ll probably have to change my OS X build for 
> this as well.
>
> You also mentioned ROOTDIR. If this is jpackage internal - I think it 
> used to be OS X public -
You can find ROOTDIR in .cfg files generated by jpackage. However this 
doesn't mean that using ROOTDIR outside of .cfg files is recommended.
Semantics of ROOTDIR can be changed or it can be removed in the future 
versions of jpackage.
There is APPDIR in public jpackage interface with semantics that will be 
stable across jpackage versions going forward.
APPDIR also hides differences between app image layout on Linux, OSX and 
Windows. On Windows and OSX APPDIR resolves in $ROOTDIR/app, on Linux in 
$ROOTDIR/lib/app.

> I have no problem using APPDIR instead since everything currently 
> seems to end up there anyhow.
Great.

- Alexey



More information about the core-libs-dev mailing list