In VS Code I want to run a particular project with an older JRE (Java. 1.8) than the one VS Code and its language server uses (Java 17).
How can I change the JRE for a project to an older JRE? I tried righting click on the JRE in the Java Projects view:
However, with this I could not get to a related setting.
2
Answers
There are three step in your project.
First you have to download a extension named Extension Pack for Java.
Second you have to edit in settings.json of Java.The path is Settings/Users/Java.And add the configuration in it.
Then you must check the jdk version on your maven file or gradle file is the current version you wanted.
The follow is a picture of the operation.The java extension only occure when you installed the Extension Pack for Java
The Java extension requires a minimum version of Java 17 to activate the java language server, use the following setting