-
Notifications
You must be signed in to change notification settings - Fork 483
Open
Description
My project requires jdk 17 to build. I use jenv to manage jdk and I set it to use java 17 locally but it seems the extension always use 21 to build project. I can build the project successfully in the terminal. I think the extension should use the java configured in java_home to build the project.
java home:
echo $JDK_HOME
/Users/user/.jenv/versions/17
Error log:
[info] [gradle-server] Gradle Server started, listening on 52563
[info] Gradle client connected to server
[info] Java Home: /Users/user/.cursor/extensions/redhat.java-1.43.1-darwin-arm64/jre/21.0.7-macosx-aarch64
[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=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=UTF-8,-Duser.country=CN,-Duser.language=en,-Duser.variant
[info] Gradle User Home: /Users/user/.gradle
[info] Gradle Version: 7.6.4
[error] FAILURE: Build failed with an exception.
I tried to add the config below but still not working
"java.configuration.runtimes": [
{
"name": "JavaSE-17",
"path": "/Users/user/.jenv/versions/17",
"default": true
}
],
"gradle.java.home": "/Users/user/.jenv/versions/17"
Metadata
Metadata
Assignees
Labels
No labels