ScoopInstaller / Java

📦 A bucket for Scoop, for Oracle Java, OpenJDK, Eclipse Temurin, IBM Semeru, Zulu, ojdkbuild, Amazon Corretto, BellSoft Liberica, SapMachine and Microsoft JDK.
https://scoop.sh
The Unlicense
257 stars 88 forks source link

Register JDK in locations searched by gradle and other tools #504

Open mwisnicki opened 8 months ago

mwisnicki commented 8 months ago

It would be nice if gradle and other Java tools could find JDKs installed by scoop.

The easiest solution is to link them under ~/.jdks/ where Intellij is normally installing them.

e.g. ln -s ~/scoop/apps/openjdk21/21.0.1-12 ~/.jdks/openjdk-21.0.1

Another much more complicated option would to to register them in ~/.m2/toolchains.xml.

mwisnicki commented 8 months ago

To test create gradle project with

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(21)
    }
}

where version is higher than your global jdk