[Java] (Fix) An error occurs when using Java 8 with the latest version (0.65.0) of VS Code’s Language Support for Java(TM) by Red Hat.

1 minute read

(Added at the beginning) It was a specification when I thought it was a bug.

Since the language support for Java(TM) version (0.65.0) or later requires Java 11 or above, an error will be emitted 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 VS Code’s Java tutorial says that it only works with Java 11 or higher. https://code.visualstudio.com/docs/languages/java

Screenshots 2020-07-29 22.25.38.png

Please refer to the following URL as a 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 it’s better to set jdk-11 to Java_Home and set jdk-8 to default in runtime like this.

(Original article) A bug occurs in the latest version (0.65.0) of Language Support for Java(TM) by Red Hat of VS Code (July 23, 2020)

I am writing Java using VSCode, but I will create a template for the project. Java:Create Java Project is no longer working and I get the following error:

Screenshot 2020-07-23 9.57.13.png

Java 11 or more recent is required to run.Please download and install a recent JDK

After this came out, I could not execute it normally. I was in trouble. The environment uses open-JDK8 with Remote-Container, and it worked well until yesterday. There is no problem with setting JAVA_HOME.

I wandered around for about 4 hours, but the cause was Language Support for Java(TM) by Red Hat ver 0.65.0 that was updated the day before. I finally managed to find a post by someone with the same symptoms. Thanks.

URGENT- “Java 11 or more recent is required to run. Please download and install a recent JDK” #852

For the time being, we are downgrading the relevant extended function and waiting for support. I’ll leave it in case someone else is in the same situation. Screenshot 2020-07-23 16.20.45.png