Skip to content

v5 Java Versions

Jake Moore edited this page Aug 30, 2026 · 6 revisions

Java Versions

KamiCommon runs on Java 8. Every module compiles to class-file major 52, so it loads on any server from 1.8.x upward. This describes the bytecode target rather than what is bundled, and it is checked on every build.

There is one exception.

what you use Java it needs why
everything else 8 matches the oldest server version this library supports
com.kamikazejam.kamicommon.database 11 HikariCP, the connection pool, is Java 11

HikariCP is the only bundled third-party library above Java 8, and Database is the only class that touches it, so that split is confined to one package. KamiCommon's own version-specific NMS classes also sit above the floor, by design: they are loaded by name only on servers that can read them.

The database exception

Call Database on Java 8, 9 or 10 and you get an IllegalStateException naming your Java version, rather than an UnsupportedClassVersionError naming a relocated class you cannot search for.

This requirement is not new in v5. HikariCP has been Java 11 since before KamiCommon 4.0.0, so a plugin using Database already needed Java 11 on v4. What v5 adds is an error message that says so.

Database lives in shared-jar, which is also what pulls HikariCP in. If you depend on shared-utils, standalone-utils or spigot-utils, you do not have HikariCP at all.

There is no per-Java or per-Minecraft artifact

All six modules publish org.gradle.jvm.version = 8 and all six compile with options.release = 8. There is no Java-version choice to make and no Minecraft-version choice either. You pick a module by what you are building, never by which JVM or which server version you are on.

Cross-version support is handled at runtime instead. spigot-nms ships an implementation for every supported Minecraft version, each targeting the JVM that version required: Java 8 through 1.16.5, 16 for 1.17, 17 through 1.20.4, 21 from 1.20.5, and 25 for 26.x. They are loaded by name at runtime, so a 1.8.8 server never loads the class built for 26.x and never needs a JVM that could read it.

Run /kc nmsversion on a server to see what it detected, and /kc nmsproviders to see which implementations resolved.

Alpha versions

The Java 8 floor arrived in 5.0.0-alpha.40. Alphas before that declare a higher version in their Gradle module metadata, and a Gradle consumer cannot resolve a module that declares a JVM version above the one it is running.

spigot-jar version declares
up to 5.0.0-alpha.36 21
5.0.0-alpha.37 to 5.0.0-alpha.39 25
5.0.0-alpha.40 and later 8

So alpha.40 is the first pre-release that both resolves on any JDK and loads on a 1.8.x server. Maven consumers are unaffected either way, because jvm.version is a Gradle-only attribute.

Building KamiCommon itself

Contributors need JDK 25 installed, plus 17 and 21. javac has to run on 25 to read the class files paper-api 26.x ships, even though it emits Java 8. Those are different settings and neither substitutes for the other.

Source is written to Java 8 language level: no var, no records, no pattern-matching instanceof, no sealed types, no String.repeat or String.strip. Use Jdk8.repeat and Jdk8.strip for the last two.

Clone this wiki locally