ADDITIONAL SYSTEM INFORMATION :
ProductName: Mac OS X
ProductVersion: 10.15.5
BuildVersion: 19F101
openjdk version "14.0.1" 2020-04-14
OpenJDK Runtime Environment (build 14.0.1+7)
OpenJDK 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
Launching a binary produced by jpackage is looking for dynamic libraries and config files in the wrong place when symlinked. You can find an example project at https://github.com/denofevil/jpackage_bug/, build a package and make a symlink to the main executable. When launched via symlink JDK 14 produced binary fails to load libapplauncher.dylib, JDK 15 produced binary fails to load config file.
If possible it would be nice to have this fixed in JDK 14 bugfix updates.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Build a dmg package using jpackage
2. Copy app bundle to the folder
3. Make a symlink to the main executable (e.g. in /usr/local/bin)
4. Launch that executable
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Executable launches app bundle and it works as expected
ACTUAL -
Error:
2020-06-19 12:43:10.006 example[57638:6219480] Contents/MacOS/libapplauncher.dylib not found.
Executable is trying to load a dynamic library from outside of the bundle, which may be a security problem.
On JDK 15 error is slightly different:
Error opening "Contents/app/example.cfg" file: No such file or directory
So, the dynamic library issue seems to be resolved, but the config is still searched in the wrong location.
---------- BEGIN SOURCE ----------
https://github.com/denofevil/jpackage_bug/
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Potential fix for JDK 15: https://github.com/denofevil/jpackage_bug/blob/master/jdk15.patch
FREQUENCY : always
ProductName: Mac OS X
ProductVersion: 10.15.5
BuildVersion: 19F101
openjdk version "14.0.1" 2020-04-14
OpenJDK Runtime Environment (build 14.0.1+7)
OpenJDK 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
Launching a binary produced by jpackage is looking for dynamic libraries and config files in the wrong place when symlinked. You can find an example project at https://github.com/denofevil/jpackage_bug/, build a package and make a symlink to the main executable. When launched via symlink JDK 14 produced binary fails to load libapplauncher.dylib, JDK 15 produced binary fails to load config file.
If possible it would be nice to have this fixed in JDK 14 bugfix updates.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Build a dmg package using jpackage
2. Copy app bundle to the folder
3. Make a symlink to the main executable (e.g. in /usr/local/bin)
4. Launch that executable
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Executable launches app bundle and it works as expected
ACTUAL -
Error:
2020-06-19 12:43:10.006 example[57638:6219480] Contents/MacOS/libapplauncher.dylib not found.
Executable is trying to load a dynamic library from outside of the bundle, which may be a security problem.
On JDK 15 error is slightly different:
Error opening "Contents/app/example.cfg" file: No such file or directory
So, the dynamic library issue seems to be resolved, but the config is still searched in the wrong location.
---------- BEGIN SOURCE ----------
https://github.com/denofevil/jpackage_bug/
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Potential fix for JDK 15: https://github.com/denofevil/jpackage_bug/blob/master/jdk15.patch
FREQUENCY : always