-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JAVA_Home should be right but still shows "Note Java 8 can still be used in your own projects" #664
Comments
It seems I have to restart VS Code Server on Host.
|
The error message that you mentioned above looks like the Spring Boot Tools extension is picking up a JDK8 to run the language server process (a tooling-internal process, not related to your projects), but it needs JDK11. I don't exactly know why the JDK8 is selected instead of the JDK11 that you have in your JAVA_HOME environment variable... :-( In case this problem persists, you can specify which JDK the Spring Boot tools should use internally (again, just internally, not for your project) via the settings:
(or whatever the right path to the Java executable of your JDK11 install is) |
I finally found a way to reproduce the problem.
I added |
I found a way to workaround this problem. sudo update-alternatives --set java /usr/lib/jvm/java-11-openjdk-amd64/bin/java |
I think this might works. I tested without any error: "spring-boot.ls.java.home": "/usr/lib/jvm/java-11-openjdk-amd64" |
@martinlippert I think STS4 can read |
Agree, exactly what @BoykoAlex is already implementing at the moment... :-) |
This is covered by the latest changes, I think, which is looking at the STS4 specific property first and tries |
Describe the bug
I think my Java setup in my Visual Studio Code should be right. But this extension still show me this:
To Reproduce
Initialize a Spring Boot project using this:
Use `Remote-SSH: Connect to Host...' open Spring Boot project
Open MAVEN view in EXPLORER, expand
demo
node, click the+
sign in the Dependencies noeSearch for
spring-boot-starter-validation
, choose theorg.springframework.boot
one.The VSCode will show this message immediately.
My
JAVA_HOME
should be right.The VSCode setting is empty.
Sample
Here is my sample project:
https://github.com/doggy8088/spring-boot-demo
The text was updated successfully, but these errors were encountered: