Java icon indicating copy to clipboard operation
Java copied to clipboard

Register JDK in locations searched by gradle and other tools

Open mwisnicki opened this issue 2 years ago • 1 comments

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 avatar Jan 11 '24 02:01 mwisnicki

To test create gradle project with

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

where version is higher than your global jdk

mwisnicki avatar Jan 11 '24 02:01 mwisnicki