To solve “Java 11 or more recent is required to run. Please download and install a recent JDK” problem
open VSCode: preference – setting – enter java-home
in settings.json example Mac
"java.home": "/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home",
"java.configuration.runtimes": [
{
"name": "JavaSE-1.8",
"path": "/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home",
},
{
"name": "JavaSE-11",
"path": "/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home",
"default": true
}
]
- Java.home: jdk11
- java.configuration.runtimes: default Java8 (1.8)
in settings.json example Windows 10
"java.home": "C:\\Program Files\\Java\\jdk-11.0.8+10",
"java.configuration.runtimes": [
{
"name": "JavaSE-1.8",
"path": "C:\\Program Files\\Java\\jdk8u265-b01",
},
{
"name": "JavaSE-11",
"path": "C:\\Program Files\\Java\\jdk-11.0.8+10",
"default": true
}
]
https://marketplace.visualstudio.com/items?itemName=redhat.java