Skip to content

Commit 63cc27e

Browse files
committed
chore(paper/dev): add javaLauncher property documentation for downgrading the active Java version in paperweight-userdev
1 parent 30748ec commit 63cc27e

File tree

1 file changed

+17
-0
lines changed
  • src/content/docs/paper/dev/getting-started

1 file changed

+17
-0
lines changed

src/content/docs/paper/dev/getting-started/userdev.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,23 @@ You should remove any dependency on the Paper API, as the dev bundle includes th
8686

8787
:::
8888

89+
:::note[Running userdev with a newer JDK]
90+
91+
Sometimes, when using a new JDK, a dev bundle might not support that JDK. If you are
92+
getting an error during the execution of `paperweightUserdevSetup`, you can set
93+
paperweight's java launcher property for paperweight to use a lower Java version.
94+
95+
You can do this by adding the following files to your `build.gradle.kts`:
96+
```kts
97+
paperweight {
98+
javaLauncher = javaToolchains.launcherFor {
99+
languageVersion = JavaLanguageVersion.of(21)
100+
}
101+
}
102+
```
103+
104+
:::
105+
89106
## Gradle tasks
90107

91108
### `reobfJar`

0 commit comments

Comments
 (0)