warning: This setting is deprecated, please use ‘java.jdt.ls.java.home’ instead
The warning you are seeing indicates that the “java.home” setting in the Java extension settings is deprecated, and you should use “java.jdt.ls.java.home” instead. Here’s how you can update your settings:
- Open Visual Studio Code and go to the “File” menu and select “Preferences”, then select “Settings”.
- In the search bar, type “java.jdt.ls.java.home” to find the Java Home path setting.
- Click on the “Edit in settings.json” link next to the “Java Home” setting.
- In the settings.json file, set the value of the “java.jdt.ls.java.home” property to the path of your JDK 11 installation. For example, on Windows, this might be “C:\Program Files\Java\jdk-11.0.13”.
- Save the changes to the settings.json file and restart Visual Studio Code.
After following these steps, Visual Studio Code should be configured to use JDK 11 as the runtime for the Java extension using the new “java.jdt.ls.java.home” setting. You should be able to develop and run Java applications that target Java 11 without any issues.