From b1858a8d0a31796d107704d52d234c047cda8699 Mon Sep 17 00:00:00 2001 From: TheSacco <146577301+TheSacco@users.noreply.github.com> Date: Mon, 3 Aug 2026 09:49:44 +0200 Subject: [PATCH 1/2] Warn users about issues with compiling Warn users about issues with compiling when on newer Java versions and how to avoid them. --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index de1834f..09dfb45 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Apply patches with `./gradlew applyAllPatches` and then run a dev server with `. ## How to contribute 1. You first need to have the currently applied patches with `./gradlew applyAllPatches` and then you can start working on the code. -2. If the applyAllPatches task fails, it could be because you don't have enough RAM. To fix this, refer to the "Set Gradle memory limit section. +2. If the applyAllPatches task fails, it could be because of several issues. To troubleshoot, refer to the "Small notes" section. 3. Then, you can edit the code in the `legitslimepaper-server/` folder 4. After you are done, you can save your changes to the "local git repo" with `./gradlew fixupMinecraftSourcePatches` (The task name may depend on what you are working on, eg `fixupPaperServerFilePatches`. Calling more than you need should be fine even if it throws a git error.) 5. Once all the changes are in the "local git repo", you can update the patch files with `./gradlew rebuildAllServerPatches`. @@ -34,4 +34,12 @@ org.gradle.jvmargs=-Xmx4G ``` This allocates 4 GB of RAM to Gradle which in most cases should be enough. +## Gradle fails to compile almost instantly with an error like: `26.0.0` or `25.0.1`? + +This is caused by your Java version being to new to compile. To avoid this, use an older version of Java (25 and 26 are confirmed to not work, while 21 should work fine). For example, to install the Java 21 JDK on Debian Linux/Debian based distros (like Ubuntu or Raspberry Pi OS), run this command as root: +``` +apt install openjdk-21-jdk +``` +After this, you may also need to switch your default JDK to the newly installed one. For example, on Debian Linux, use the command `update-java-alternatives` with root privileges. + For more information, refer to [PaperMC/paperweight-examples](https://github.com/PaperMC/paperweight-examples) and [PaperMC/Paper/CONTRIBUTING.md](https://github.com/PaperMC/Paper/blob/master/CONTRIBUTING.md). (The CONTRIBUTING.md also explains how to set up the development environment) From 876ca00f84c3b3342636d7e9ed532432d5adac0c Mon Sep 17 00:00:00 2001 From: TheSacco <146577301+TheSacco@users.noreply.github.com> Date: Mon, 3 Aug 2026 09:56:04 +0200 Subject: [PATCH 2/2] Update README with Java version check instructions Added instructions to check the current Java version. --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 09dfb45..e78eb0b 100644 --- a/README.md +++ b/README.md @@ -42,4 +42,9 @@ apt install openjdk-21-jdk ``` After this, you may also need to switch your default JDK to the newly installed one. For example, on Debian Linux, use the command `update-java-alternatives` with root privileges. +To check which Java version you are currently using, you can run the following command and look at the version string it outputs: +``` +java -version +``` + For more information, refer to [PaperMC/paperweight-examples](https://github.com/PaperMC/paperweight-examples) and [PaperMC/Paper/CONTRIBUTING.md](https://github.com/PaperMC/Paper/blob/master/CONTRIBUTING.md). (The CONTRIBUTING.md also explains how to set up the development environment)