Skip to content

[bugfix] macOS .app: accept Java 21+ for JVM discovery#6436

Open
joewiz wants to merge 1 commit into
eXist-db:developfrom
joewiz:bugfix/macos-app-jvm-required-21plus
Open

[bugfix] macOS .app: accept Java 21+ for JVM discovery#6436
joewiz wants to merge 1 commit into
eXist-db:developfrom
joewiz:bugfix/macos-app-jvm-required-21plus

Conversation

@joewiz
Copy link
Copy Markdown
Member

@joewiz joewiz commented Jun 2, 2026

[This PR was co-authored with Claude Code. -Joe]

Summary

The macOS .app bundle's Info.plist JVMVersion key currently reads 21 (literal). Apple's JavaAppLauncher interprets that as a strict match: hosts that only have Java 22 / 23 / 24 installed would be rejected even though eXist runs fine on those. Switch to 21+ — the established Apple-convention "this major or later" form (1.6+, 1.7+, 1.8+, …) — so the launcher picks up any JDK ≥ 21.

Follow-up to @duncdrum's review on PR #6434 (#6434 (comment)), where he flagged the same JVM-discoverability concern.

What changed

exist-distribution/pom.xml, line 926: <jvmRequired>21</jvmRequired><jvmRequired>21+</jvmRequired>.

The appbundler-maven-plugin propagates this value into Info.plist verbatim as a string, so the + reaches the launcher with no further plumbing.

Verification

mvn -pl exist-distribution com.evolvedbinary.appbundler:appbundler-maven-plugin:3.3.0:bundle@exist-db-mac-app -DskipTests
/usr/libexec/PlistBuddy -c "Print :JVMVersion" exist-distribution/target/exist-distribution-*.app/Contents/Info.plist
# 21+

End-to-end JVM-discovery testing against the various JDK distributions @duncdrum mentioned (Zulu / Temurin / system-default) needs the full signed-and-notarized DMG pipeline, which happens on a release cut — so the "would Zulu have been discovered before this change?" question is best answered against the next beta DMG.

Related

The appbundler-maven-plugin writes <jvmRequired> verbatim into the
.app bundle's Info.plist as JVMVersion. Apple's JavaAppLauncher uses
that key (and the convention "<major>+") to gate which installed JVM
it will use to launch the app. With <jvmRequired>21</jvmRequired> the
launcher's plist contains JVMVersion = 21 (a strict match), so a
host with only Java 22 / 23 / 24 / … installed would be rejected even
though eXist runs fine on those.

Switch to "21+" — matches the established Apple convention (1.6+,
1.7+, 1.8+, …) and lines up with how Zulu / Temurin / Liberica / Apple
JDKs all install their major-version directories. Verified the plugin
propagates the literal:

    /usr/libexec/PlistBuddy -c "Print :JVMVersion" Contents/Info.plist
    # 21+

Follow-up to @duncdrum review on PR eXist-db#6434 (eXist-db#6434 (comment)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant