I was building a Java environment in VSCode, but
in setting.json
"java.home": "C:...java\openjdk-17.0.2"
will also produce the following error:
This setting is detailed, please use 'java.jdt.ls.java.home' installed.
I'm a beginner, so please understand that many sentences may be strange.
environment:
Windows 10
Java 16.0.2
Translating the displayed message (with supplementary information) is as follows:
This setting (java.home
) is deprecated.Use java.jdt.ls.java.home
instead.
You may have set java.home
on the page you modeled, but try setting PATH for java.jdt.ls.java.home
as the message says.
Alternatively, if the environment variable JDK_HOME
or JAVA_HOME
is set, you may also refer to it.
Setting the JDK | Language support for Java™ for Visual Studio Code
The path to the Java Development Kit can be specified by the java.jdt.ls.java.home setting in VS Code settings (workspace/user settings).If not specified, it is searched in the following order until a JDK meetings current minimum requirement.
JDK_HOME
environment variableJAVA_HOME
environment variable
java\openjdk-17.0.2
appears, but you need to backslash twice on Windows.
example:
java\\openjdk-17.0.2
© 2024 OneMinuteCode. All rights reserved.