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.
I need to use the JDK 8 (working on Apache Beam and that's the last supported version). I have been working on that and haven't had any issues until this came up.
I have read through this article and implemented the points mentioned there.
Here is my workspace settings on Visual Studio Code (I have double-checked the paths)
{
"java.configuration.updateBuildConfiguration": "disabled",
"java.home": "/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home",
"java.configuration.runtimes": [
{
"name": "JavaSE-1.8",
"path": "/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home",
"default": true
},
{
"name": "JavaSE-11",
"path": "/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home",
}
]
}
Other helpful information:
? echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
and
? which java
/usr/bin/java
This started happening today even though I have been running JDK 8 on Visual Studio Code successfully for a while now. I don't remember updating Visual Studio Code, so I'm not sure as to why this is being displayed now since apparently the pop-up has been displayed since mid-April (asked on the vscode-java Gitter channel).
question from:
https://stackoverflow.com/questions/63043585/visual-studio-code-showing-java-11-or-more-recent-is-required-to-run-please-do 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…