|
From: Vest <no...@gi...> - 2026-06-04 18:08:20
|
Branch: refs/heads/master Home: https://github.com/PCGen/pcgen Commit: 56e4bd713a9f2f95c5ca091ff9f07906fd7193e0 https://github.com/PCGen/pcgen/commit/56e4bd713a9f2f95c5ca091ff9f07906fd7193e0 Author: Vest <Ve...@us...> Date: 2026-06-05 (Fri, 05 Jun 2026) Changed paths: M build.gradle Log Message: ----------- Fix jpackage app crash on JDKs where jlink package probe misses java.logging (#7581) The org.beryx.jlink plugin's built-in package→module resolver (the default `useJdeps = 'no'`) silently fails to find JDK modules on some distributions — observed on Temurin 25/macOS, where the createMergedModule log shows "Cannot find module exporting java.logging" (and java.io, java.lang, java.util, …) for the JDK packages used by the merged jars. The plugin proceeds anyway and emits a merged module-info that omits the missing `requires` directives. At runtime freemarker's _JULLoggerFactory then fails with: IllegalAccessError: class freemarker.log._JULLoggerFactory (in module net.sourceforge.pcgen.merged.module) cannot access class java.util.logging.Logger (in module java.logging) because module net.sourceforge.pcgen.merged.module does not read module java.logging …and PcGen.app dies before main() runs. SapMachine 25 happens to resolve the JDK modules correctly, so the same build worked on some machines and not on others. Switch to `useJdeps = 'exclusively'`. The JDK's own jdeps tool ships with every conforming JDK 9+ and reliably resolves modules across vendors. With this setting the merged module-info contains `requires java.logging` (plus java.sql, java.prefs, java.xml, java.desktop, jdk.jfr, jdk.unsupported, jdk.xml.dom, java.compiler) regardless of which JDK is building the image, and the packaged app launches cleanly. Listing those JDK modules explicitly inside `mergedModule { … }` is not a viable alternative: the plugin appends user-supplied `requires` verbatim after the auto-derived ones with no dedup, so on JDKs where derivation succeeds the javac compile of module-info would fail with duplicate-requires errors. With `useJdeps = 'exclusively'` we keep just the SPI/reflection-loaded ones the toolchain cannot derive (java.naming, java.scripting, java.management, jdk.httpserver, jdk.unsupported.desktop). To unsubscribe from these emails, change your notification settings at https://github.com/PCGen/pcgen/settings/notifications |