We should expose an APPDIR variable to allow an application packaged with jpackage to be able to access a file within the application directory once the application is installed. This would allow an application to locate resources or other files that aren't (or can't be) packaged inside the application's jar file.
An example of this is to be able to pass the location of a splash screen image as a command line argument to the java launcher. Like this:
$ jpackage ... --java-options '-splash:$APPDIR/app/splash.png'
Currently the above will work, but APPDIR is not documented or listed as a supported interface.
One thing to consider is whether it should point to the top directory (as it does today), or the "app"directory. The latter might be preferable in that it would allow us to relocate the app directory relative to the launcher or rename it in the future. If we are going to make the existence of an "app" subdirectory part of the supported interface, then it doesn't matter whether it points to the app directory or its parent.
An example of this is to be able to pass the location of a splash screen image as a command line argument to the java launcher. Like this:
$ jpackage ... --java-options '-splash:$APPDIR/app/splash.png'
Currently the above will work, but APPDIR is not documented or listed as a supported interface.
One thing to consider is whether it should point to the top directory (as it does today), or the "app"directory. The latter might be preferable in that it would allow us to relocate the app directory relative to the launcher or rename it in the future. If we are going to make the existence of an "app" subdirectory part of the supported interface, then it doesn't matter whether it points to the app directory or its parent.
- relates to
-
JDK-8232972 document how $APPDIR can be used in --java-options
- Resolved