RFR: 8351369: [macos] Use --install-dir option with DMG packaging
Alexander Matveev
almatvee at openjdk.org
Wed May 28 07:16:30 UTC 2025
- `--install-dir` option in DMG packaging is no longer ignored.
- Defaults are still the same: `/Applications` and `/Library/Java/JavaVirtualMachines`.
- If the installation directory doesn't exist, jpackage will try to create and delete it right after the DMG package is created.
- If jpackage was unable to create installation directory error will be thrown or if installation directory points to invalid location like file.
- It will be user responsibility to make sure installation directory exist on target machine, since DMG cannot create directories during drag and drop.
- Target directory in case of non-default installation dir will display full path. See image below for example.

-------------
Commit messages:
- 8351369: [macos] Use --install-dir option with DMG packaging
Changes: https://git.openjdk.org/jdk/pull/25481/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25481&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8351369
Stats: 182 lines in 5 files changed: 73 ins; 73 del; 36 mod
Patch: https://git.openjdk.org/jdk/pull/25481.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25481/head:pull/25481
PR: https://git.openjdk.org/jdk/pull/25481
More information about the core-libs-dev
mailing list