Skip to content

Fix: Java 17 bytecode target on paper module (fixes #3661) - #3662

Merged
dmulloy2 merged 1 commit into
dmulloy2:masterfrom
kikMine0:fix-paper-java17-compat
Aug 19, 2026
Merged

Fix: Java 17 bytecode target on paper module (fixes #3661)#3662
dmulloy2 merged 1 commit into
dmulloy2:masterfrom
kikMine0:fix-paper-java17-compat

Conversation

@kikMine0

Copy link
Copy Markdown
Contributor

Commit 98856a8 only set compileJava release=17 on the root project. The paper subproject still built PaperPlatformProvider (and everything else under paper/src) with the JDK 25 toolchain and no release cap, producing class file version 69, which crashes servers on Java 17-21 with UnsupportedClassVersionError and disables the plugin on load.

Setting options.release=17 alone breaks :paper:compileClasspath resolution, since paper-api's dev-bundle metadata is published as JVM-25-only; Gradle infers a TargetJvmVersion=17 requirement from the release flag and refuses to resolve it. Pinning compileClasspath/ runtimeClasspath/testCompileClasspath/testRuntimeClasspath to TargetJvmVersion=25 keeps dependency resolution on the JDK 25 toolchain while compileJava still emits Java 17-compatible bytecode.

Commit 98856a8 only set compileJava release=17 on the root project.
The paper subproject still built PaperPlatformProvider (and everything
else under paper/src) with the JDK 25 toolchain and no release cap,
producing class file version 69, which crashes servers on Java 17-21
with UnsupportedClassVersionError and disables the plugin on load.

Setting options.release=17 alone breaks :paper:compileClasspath
resolution, since paper-api's dev-bundle metadata is published as
JVM-25-only; Gradle infers a TargetJvmVersion=17 requirement from the
release flag and refuses to resolve it. Pinning compileClasspath/
runtimeClasspath/testCompileClasspath/testRuntimeClasspath to
TargetJvmVersion=25 keeps dependency resolution on the JDK 25
toolchain while compileJava still emits Java 17-compatible bytecode.
@dmulloy2
dmulloy2 merged commit 78b1016 into dmulloy2:master Aug 19, 2026
3 checks passed
@kikMine0
kikMine0 deleted the fix-paper-java17-compat branch August 19, 2026 21:09
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.

2 participants