VS代码spring boot扩展中的JDK错误

ara*_*ind 2 java spring-tool-suite visual-studio-code

我的 Spring Boot 的 vscode 扩展无法正常启动。

当我将配置设置为 : 时"spring-boot.ls.java.home": "C:\\Program Files\\Java\\jdk1.8.0_311",我从扩展中收到以下错误。

Error trying to find JVM: Error: Command failed: C:\Program Files\Java\jdk1.8.0_311\bin\java.exe --list-modules
Unrecognized option: --list-modules
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Run Code Online (Sandbox Code Playgroud)

当我将配置设置为 : 时 "spring-boot.ls.java.home": "C:\\Program Files\\Java\\jdk1.8.0_311\\jre",我从扩展中收到以下错误。

Error trying to find JVM: Error: Command failed: C:\Program Files\Java\jdk1.8.0_311\jre\bin\java.exe --list-modules
Unrecognized option: --list-modules
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Run Code Online (Sandbox Code Playgroud)

怎么解决这个问题。我对个人笔记本电脑配置没有任何问题。我正在客户端环境中配置。

Mar*_*ert 5

Spring Tools for VSCode 需要 JDK >= 11 才能运行,因此请让您提到的配置指向 JDK >= 11。

请注意,此 JDK 用于运行部分 Spring 工具,并且独立于您用于编译或运行项目的 JDK。您可以继续使用 JDK 8 来实现此目的。