title: Is it possible to select JDK 8 for Java project in Visual Studio Code?
body: <p>I am trying to use Visual Studio Code to compile and run a maven-based Java project.</p>
  <p>VSCODE requires for itself JDK 11. I installed JDK 11 and added it as java.home in VSCODE &quot;Java: Configure Java Runtime&quot; section.</p>
  <p>The project however requires Java 8.
  I have JDK 8 pointed by JAVA_HOME, and pom.xml specifies</p>
  <pre><code>&lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt;
  &lt;maven.compiler.target&gt;1.8&lt;/maven.compiler.target&gt;
  </code></pre>
  <p>However when I compile and try to run the project in VSCODE, I get messages</p>
  <pre><code>Build path specifies execution environment JavaSE-1.8. There are no JREs installed in the workspace that are strictly compatible with this environment. 
  
  The compiler compliance specified is 1.8 but a JRE 11 is used.
  </code></pre>
  <p>Even though VSCODE knows JDK 8 is reachable:</p>
  <p><a href="https://i.stack.imgur.com/fs42C.png" rel="noreferrer"><img src="https://i.stack.imgur.com/fs42C.png" alt="enter image description here" /></a></p>
  <p>How do I instruct VSCODE to use JDK 8 (rather than JDK 11) as runtime for the project?</p>