You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/paper/dev/getting-started/userdev.md
+13-5Lines changed: 13 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,20 +86,28 @@ You should remove any dependency on the Paper API, as the dev bundle includes th
86
86
87
87
:::
88
88
89
-
:::note[Running userdev with a newer JDK]
89
+
:::note[Configuring the Java toolchain for userdev setup]
90
90
91
-
A dev bundle might not support the JDK version Gradle is configured to use.
92
-
If you are getting an error during the execution of `paperweightUserdevSetup`, you can try
93
-
setting paperweight's `javaLauncher` property to a different Java version.
91
+
A given dev bundle may not always support the Java toolchain Gradle is configured to use
92
+
(whether configured explicitly or inherited from the Gradle runtime).
93
+
If you are getting an error during the execution of `paperweightUserdevSetup` (especially patch application failures),
94
+
you can try setting paperweight's `javaLauncher` property to a different Java version.
94
95
96
+
For example, with 1.17.1:
95
97
```kts title="build.gradle.kts"
96
98
paperweight {
97
99
javaLauncher = javaToolchains.launcherFor {
98
-
languageVersion =JavaLanguageVersion.of(21)
100
+
// Example scenario:
101
+
// Paper 1.17.1 was originally built with JDK 16 and the bundle
102
+
// has not been updated to work with 21+ (but we want to compile with a 25 toolchain)
103
+
languageVersion =JavaLanguageVersion.of(17)
99
104
}
100
105
}
101
106
```
102
107
108
+
Among others, the [multi-project branch of the PaperMC/paperweight-test-plugin](https://github.com/PaperMC/paperweight-test-plugin/tree/multi-project)
0 commit comments