Looks like an instance of: JDK-8260335 <https://bugs.openjdk.java.net/browse/JDK-8260335> : [macos] Running app using relative path causes problems (fixed in jdk17 build b09)

you can try builds from https://jdk.java.net/17/ to confirm fix.

/Andy

On 7/21/2021 4:46 PM, Bruno Borges wrote:
Hi all,

Been trying to use Java 16.0.1 to produce a PKG for the fx2048 [1] game, and 
the generated app-image comes with a binary launcher that tries to load the 
.cfg file from the wrong directory.

Anyone seen this problem?

fx2048.app/Contents/MacOS  master -> origin/master ✔                            
                                                                                   
                       1h59m  java:16.0.1
$ tree ../../../ -L 4
../../../
└── fx2048.app
     └── Contents
         ├── Info.plist
         ├── MacOS
         │   └── fx2048
         ├── PkgInfo
         ├── Resources
         │   └── fx2048.icns
         ├── app
         │   └── fx2048.cfg
         └── runtime
             └── Contents

7 directories, 5 files

$ ./fx2048
Error opening 
"/Users/bruno/myprojects/fx2048/build/installers/fx2048.app/Contents/Contents/app/fx2048.cfg"
 file: No such file or directory

[1] http://github.com/brunoborges/fx2048

Reply via email to