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:

  1. Open Visual Studio Code and go to the “File” menu and select “Preferences”, then select “Settings”.
  2. In the search bar, type “java.jdt.ls.java.home” to find the Java Home path setting.
  3. Click on the “Edit in settings.json” link next to the “Java Home” setting.
  4. 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”.
  5. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.