Today Visual Studio Code started showing me a pop-up saying:
Java 11 or more recent is required to run. Please download and install a recent JDK.
About the Java 11 requirement:
The Eclipse platform has decided to require Java 11 as the minimum requirement for its September 2020 release. See Upgrading the Eclipse SDK target environment for the September Eclipse release....
Because vscode-java depends on the Eclipse JDT.LS server, that same requirement to vscode-java. But the timeline is be more aggressive: Indeed, vscode-java usually consumes JDT.LS builds that depend on bleeding edge JDT features, so effectively shipping pre-release versions of Eclipse Platform/JDT. As of July 22nd, 2020, Java 11 is now required for running vscode-java.
This is from:https://github.com/redhat-developer/vscode-java/wiki/JDK-Requirements#java.configuration.runtimes
Just uninstall all previous JDKs, i.e., less than or equal to JDK 11.
Re-install JDK 11 from https://www.oracle.com/java/technologies/javase-jdk11-downloads.html
Make sure your system variable JAVA_HOME points to the latest installed JDK like "C:\Program Files\Java\jdk-11.0.8" (for Windows)
Restart Visual Studio Code
Go to Workspace settings → Java: Home
Select "Edit in settings.json"
Your settings.json should look like:
settings.json_image
{
"java.completion.favoriteStaticMembers": [
"org.junit.Assert.*",
"org.junit.Assume.*",
"org.junit.jupiter.api.Assertions.*",
"org.junit.jupiter.api.Assumptions.*",
"org.junit.jupiter.api.DynamicContainer.*",
"org.junit.jupiter.api.DynamicTest.*",
"org.mockito.Mockito.*",
"org.mockito.ArgumentMatchers.*",
"org.mockito.Answers.*"
],
"java.home": "C://Program Files//Java//jdk-11.0.8"
}