Hi Daniel,
I can not reproduce the issue you experience with jdk25.0.1:
---
$ ~/jdk-25.0.1.jdk/Contents/Home/bin/jpackage --input input --dest
output --type app-image --main-jar hello.jar --main-class
com.my_domain.project.Hello --mac-package-identifier com.my-domain.project
$ echo $?
0
---
If I run the same command line without ` --mac-package-identifier`
option it fails as expected:
---
$ ~/jdk-25.0.1.jdk/Contents/Home/bin/jpackage --input input --dest
output --type app-image --main-jar hello.jar --main-class
com.my_domain.project.Hello
Bundler Mac Application Image skipped because of a configuration
problem: invalid mac bundle identifier [com.my_domain.project].
Advice to fix: specify identifier with "--mac-package-identifier".
---
The same failure for `--mac-package-identifier com.my_domain.project`
(with the underscore):
---
$ ~/jdk-25.0.1.jdk/Contents/Home/bin/jpackage --input input --dest
output --type app-image --main-jar hello.jar --main-class
com.my_domain.project.Hello --mac-package-identifier com.my_domain.project
Bundler Mac Application Image skipped because of a configuration
problem: invalid mac bundle identifier [com.my_domain.project].
Advice to fix: specify identifier with "--mac-package-identifier".
---
Any chance you accidentally put the string with the underscore instead
of the hyphen as a value of the `--mac-package-identifier` option on
your command line?
- Alexey
On 11/3/2025 11:43 AM, Daniel Peintner wrote:
Hi,
I am about to switch a JavaFX project from JDK21 to JDK25 and I
noticed a problem when running jpackage.
My domain has a hyphen, like in www.my-domain.com
<http://www.my-domain.com>
Hence, my Java package reads like this: com.my_domain.project
Note: hyphen becomes underscore.
Running vanilla jpackage in JDK21 complained with
Invalid Mac-Bundle-ID [com.my_domain.project]
due to the *invalid* underscore and suggests me to use
"--mac-package-identifier"
Hence, I added --mac-package-identifier com.my-domain.project (with
the hyphen again)
All good so far.
Running the same code with JDK25 with the above settings shows the
error message again
Invalid Mac-Bundle-ID [com.my_domain.project]
I can add any argument to --mac-package-identifier
It seems it is simply not taken into account.
I am using JDK 25.0.1
Is this a known issue with JDK25 and jpackage?
Is there any other way to make jpackage work?
Thanks,
-- Daniel