Answer a question

My vscode extension for spring boot is is not starting properly.

When I set the configuration as : "spring-boot.ls.java.home": "C:\\Program Files\\Java\\jdk1.8.0_311", I am getting the below error from the extension.

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.

When I set the configuration as : "spring-boot.ls.java.home": "C:\\Program Files\\Java\\jdk1.8.0_311\\jre", I am getting the below error from the extension.

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.

How to resolve this. I have no issues with personal laptop configuration. I am configuring in client environment.

Answers

The Spring Tools for VSCode require a JDK >= 11 to run, so please let the configuration that you mentioned point to a JDK >= 11.

Please note that this JDK is used to run parts of the Spring Tools and is independent of the JDK that you use to compile or run your projects on. You can continue to use a JDK 8 for that purpose.

Logo

开发云社区提供前沿行业资讯和优质的学习知识,同时提供优质稳定、价格优惠的云主机、数据库、网络、云储存等云服务产品

更多推荐