Java Version Requirements
Hytale server and plugin development require specific Java versions. This guide clarifies the requirements and helps resolve common version-related issues.
Official Requirements
| Component | Java Version | Notes |
|---|---|---|
| Server Runtime | Java 25 | Full mod/plugin support |
| Plugin Development | Java 25 | Required for compilation |
| Legacy Support | Java 21 | Limited functionality |
“Use java 21 my love” … “why 21? it says 25 in the docs” - Common confusion from Discord
The official requirement is Java 25 for full plugin and mod support. Some hosting providers still use Java 21, which may cause compatibility issues.
Checking Your Java Version
Command Line
# Check runtime version
java -version
# Check compiler version
javac -versionExpected output for Java 25:
openjdk version "25" 2025-09-16
OpenJDK Runtime Environment (build 25+...)
OpenJDK 64-Bit Server VM (build 25+..., mixed mode, sharing)Common Version Mismatch Issues
If you see errors like:
Cannot resolve symbol 'hypixel'UnsupportedClassVersionError- Class file version errors
These often indicate a Java version mismatch.
Installing Java 25
Windows
-
Install: Run the installer, enable “Set JAVA_HOME variable”
-
Verify:
java -version -
Multiple Versions: If you have multiple Java versions:
# Set JAVA_HOME for current session set JAVA_HOME=C:\Program Files\Java\jdk-25 # Add to PATH set PATH=%JAVA_HOME%\bin;%PATH%
macOS
Using Homebrew:
# Install
brew install openjdk@25
# Link
sudo ln -sfn /opt/homebrew/opt/openjdk@25/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-25.jdk
# Verify
java -versionUsing SDKMAN (recommended for managing multiple versions):
# Install SDKMAN
curl -s "https://get.sdkman.io" | bash
# Install Java 25
sdk install java 25-open
# Use Java 25
sdk use java 25-openLinux
Ubuntu/Debian:
# Add repository and install
sudo apt update
sudo apt install openjdk-25-jdk
# Set as default
sudo update-alternatives --config java
# Verify
java -versionFedora/RHEL:
sudo dnf install java-25-openjdk java-25-openjdk-develArch Linux:
sudo pacman -S jdk-openjdkUsing SDKMAN (any Linux):
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install java 25-openIDE Configuration
IntelliJ IDEA
-
Project SDK: File > Project Structure > Project > SDK
- Select Java 25 or add new SDK pointing to Java 25 installation
-
Gradle JVM: File > Settings > Build, Execution, Deployment > Build Tools > Gradle
- Set Gradle JVM to Java 25
-
Language Level: File > Project Structure > Project > Language level
- Set to 25
VS Code
- Install “Extension Pack for Java”
- Set
java.configuration.runtimesin settings:{ "java.configuration.runtimes": [ { "name": "JavaSE-25", "path": "/path/to/jdk-25", "default": true } ] }
Eclipse
- Window > Preferences > Java > Installed JREs
- Add Java 25 JDK
- Set as default
- Update project compliance level to 25
Build Configuration
Gradle (build.gradle.kts)
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(25))
}
}
// Or explicitly set source/target compatibility
tasks.withType<JavaCompile> {
sourceCompatibility = "25"
targetCompatibility = "25"
}Gradle (build.gradle)
java {
toolchain {
languageVersion = JavaLanguageVersion.of(25)
}
}
// Or
sourceCompatibility = '25'
targetCompatibility = '25'Maven (pom.xml)
<properties>
<maven.compiler.source>25</maven.compiler.source>
<maven.compiler.target>25</maven.compiler.target>
</properties>
<!-- Or use compiler plugin -->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>25</source>
<target>25</target>
</configuration>
</plugin>
</plugins>
</build>Hosting Provider Notes
Some hosting providers may not support Java 25 yet:
| Provider | Java Version | Status |
|---|---|---|
| Hetzner | Java 25 | Full support |
| OVH | Java 25 | Full support |
| ShockByte | Java 21 | Limited mod support |
| Bisect Hosting | Varies | Check panel settings |
| Pterodactyl | Configurable | Set in startup |
If your host only supports Java 21:
- Some mods/plugins may not load
- You may see class version errors
- Consider switching to a host with Java 25 support
- Or use a VPS where you control the Java version
Troubleshooting
”UnsupportedClassVersionError”
Error:
java.lang.UnsupportedClassVersionError: com/example/MyPlugin has been compiled
by a more recent version of the Java RuntimeSolution: Your server is running an older Java version than your plugin was compiled with. Update the server’s Java to 25.
Plugin Works Locally, Fails on Server
Cause: Local development uses Java 25, but server host uses Java 21.
Solution:
- Contact host to upgrade Java
- Switch to a host supporting Java 25
- Use a VPS with manual Java installation
IDE Shows Errors But Code Compiles
Cause: IDE using different Java version than build tool.
Solution:
- Sync IDE SDK with build configuration
- Invalidate IDE caches and restart
- Reimport the project
Multiple Java Versions
If you need multiple Java versions for different projects:
Using SDKMAN (Recommended)
# List available versions
sdk list java
# Install multiple versions
sdk install java 21-open
sdk install java 25-open
# Switch between versions
sdk use java 25-open # Current terminal only
sdk default java 25-open # Set as defaultUsing jEnv (macOS/Linux)
# Install jEnv
brew install jenv
# Add Java versions
jenv add /path/to/jdk-21
jenv add /path/to/jdk-25
# Set global default
jenv global 25
# Set per-directory
cd my-hytale-project
jenv local 25Server Startup with Specific Java
If you have multiple Java versions, specify the path explicitly:
# Windows
"C:\Program Files\Java\jdk-25\bin\java" -jar HytaleServer.jar
# Linux/macOS
/usr/lib/jvm/java-25-openjdk/bin/java -jar HytaleServer.jarNext Steps
- Getting Started - Complete setup guide
- Plugin Development - Start building plugins
- Common Issues - Troubleshooting guide