1

I have been programming a java project using JDK14 and VSCode. Recently JDK15 is available, and I switched to the JDK. As for configuration, I pointed the VScode java.home and system JAVA_HOME to the new JDK folder.

When I clear the VSCode cache and restart the IDE, I started receiving this error

{
"resource": "/E:/dev/java/challenges/",
"owner": "_generated_diagnostic_collection_name_#3",
"code": "963",
"severity": 8,
"message": "Unbound classpath container: 'JRE System Library [JavaSE-15]' in project 'challenges'",
"source": "Java",
"startLineNumber": 1,
"startColumn": 1,
"endLineNumber": 1,
"endColumn": 1
} 

I have seen similar questions/answers, but none of them was directed to VSCode.

Screen shot on the error

HarryQ
  • 1,075
  • 1
  • 8
  • 24

2 Answers2

2

According to VsCode-Java in Twitter, JDK15 support won't be released until the end of September, and here is a github issue that's related to Java 15 not support.

Molly Wang-MSFT
  • 5,681
  • 1
  • 3
  • 17
1

https://stackoverflow.com/a/42525941/1005462 this one was helpfull;

replace : build block in POM to

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin>
    </plugins>
</build>
user1005462
  • 227
  • 2
  • 6