Since Java 11 or higher is required in Language Support for Java (TM) version (0.65.0) or later, an error will be thrown in the Java 8 environment. At first I thought it was a bug, but it seems to be a specification. (Thank you for letting me know in the comments!)
Even the Java tutorial of VS Code does not work unless it is Java 11 or higher. https://code.visualstudio.com/docs/languages/java
Please refer to the following URL for the solution. https://github.com/redhat-developer/vscode-java/wiki/JDK-Requirements#setting-the-jdk
In particular,
"java.home": "c:\\java\\jdk-11",
"java.configuration.runtimes": [
{
"name": "JDK-1.8",
"path": "C:\\java\\Java1.8.0_151",
"default": true
},
],
I think that you should set jdk-11 in Java_Home like this and set jdk-8 to default in runtimes.
I'm writing Java using VSCode, but I'm creating a project template. Java: Create Java Project no longer works and I get the following error:
Java 11 or more recent is required to run. Please download and install a recent JDK
After this came out, I couldn't execute it normally. I was in trouble.
The environment uses open-JDK8 with Remote-Container, and it worked in a good mood until yesterday. There is no problem with the JAVA_HOME setting.
I wandered around for about 4 hours, but the cause was Language Support for Java (TM) by Red Hat ver0.65.0, which was updated the day before.
I finally found a post from someone who had the same symptoms and was able to respond. Thanks.
[URGENT- "Java 11 or more recent is required to run. Please download and install a recent JDK" #852
](https://github.com/microsoft/vscode-java-debug/issues/852)
For the time being, we are waiting for support by downgrading the extension. I'll keep it in case someone in the same situation.
<img width="610" alt="スクリーンショット 2020-07-23 16.20.45.png " src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/270149/6e7204f6-2b2c-e540-40e8-e2545075ceed.png ">
Recommended Posts