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
I have the JAVA_HOME variable set to the Temurin 21 JDK: /usr/lib/jvm/temurin-21-jdk-amd64. I expected that Gradle would do something sensible like use this as the default unless I configure otherwise.
Even if I set "java.jdt.ls.java.home": "/usr/lib/jvm/temurin-21-jdk-amd64", this is ignored. It is only if I set "java.import.gradle.java.home": "/usr/lib/jvm/temurin-21-jdk-amd64", that my JDK is used.
To Reproduce
Set $JAVA_HOME, create dummy gradle project as above.
Expected behavior
I expected $JAVA_HOME to be used as a reasonable default.
Output from "Gradle for Java"
You can find this by clicking on the "Output" panel, then selecting the "Gradle for Java" channel from the dropdown.
[info] [gradle-server] Gradle Server started, listening on 45455
[info] Gradle client connected to server
[info] Java Home: /home/ed/.vscode/extensions/redhat.java-1.36.0-linux-x64/jre/17.0.13-linux-x86_64
[info] JVM Args: --add-opens=java.base/java.util=ALL-UNNAMED,--add-opens=java.base/java.lang=ALL-UNNAMED,--add-opens=java.base/java.lang.invoke=ALL-UNNAMED,--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens=java.base/java.nio.charset=ALL-UNNAMED,--add-opens=java.base/java.net=ALL-UNNAMED,--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED,-XX:MaxMetaspaceSize=384m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant
[info] Gradle User Home: /home/ed/.gradle
[info] Gradle Version: 8.8
[info] Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.8/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
CONFIGURE SUCCESSFUL in 2s
[info] Found 18 tasks
Does the bug still exist if you disable all other extensions?
If I don't install Language Server for Java, I get a Java 17 JDK by default, which is still unexpected. If I install Language Server for Java, I get the same one as above.
The text was updated successfully, but these errors were encountered:
Extension Name: vscode-gradle
Extension Version: 3.16.4
OS Version: Ubuntu 22.04.5 LTS
VSCode version: 1.95.2
Describe the bug
I have the
JAVA_HOME
variable set to the Temurin 21 JDK:/usr/lib/jvm/temurin-21-jdk-amd64
. I expected that Gradle would do something sensible like use this as the default unless I configure otherwise.But this does not seem to be what happens.
If I create a dummy
build.gradle
file containing:And then I run this from VS code, I get:
Not what I was expecting!
Even if I set
"java.jdt.ls.java.home": "/usr/lib/jvm/temurin-21-jdk-amd64"
, this is ignored. It is only if I set"java.import.gradle.java.home": "/usr/lib/jvm/temurin-21-jdk-amd64"
, that my JDK is used.To Reproduce
Set $JAVA_HOME, create dummy gradle project as above.
Expected behavior
I expected $JAVA_HOME to be used as a reasonable default.
Output from "Gradle for Java"
You can find this by clicking on the "Output" panel, then selecting the "Gradle for Java" channel from the dropdown.
Does the bug still exist if you disable all other extensions?
If I don't install Language Server for Java, I get a Java 17 JDK by default, which is still unexpected. If I install Language Server for Java, I get the same one as above.
The text was updated successfully, but these errors were encountered: