VSCode and RedHat Java: wrong JDK for gradle tasks
Dear community,
I've installed OpenJDK 21. I have configured JAVA_HOME and JDK_HOME accordingly, setup the JDK Runtime under Project Settings (JavaSE-21, which correctly points to the Eclipse Adoptium's jdk 21 folder). The
build.gradle
file is configured to run with Java version 21 (see following config). I have no clue why, when I start the Gradle tasks via the Gradle integration tab, it uses the java.exe included in the redhat's extension (java v. 17).
Running gradlew from the shell, it works correctly (i.e. .\gradlew.bat init
)
Thanks for any help 🙂
Gradle's output:
6 Replies
⌛
This post has been reserved for your question.
Hey @elegos! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
You should have this option in your setting
Java › Import: Gradle: Java: Home
Set this to your Java installation directoryShould I point to java.exe or to the JDK folder?
Oh, it's the java home, so the JDK folder (in theory)
It works flawlessly! Thank you very much!
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
Post Closed
This post has been closed by <@366713959396409346>.