Java 17 is mis-identified as Java 8
See original GitHub issueError message in VS Code (Source: Spring Boot Tools (Extension)
):
Spring Tools Language Server requires Java 11 or higher to be launched. Current Java /opt/java/17.0.1/bin/java. (Note Java 8 can still be used in your own projects. Java 11 is only required to launch the Spring Tools Language Server process)
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (9 by maintainers)
Top Results From Across the Web
Java 17 features: A comparison between versions 8 and 17
Java has changed considerably over last few years. Read about Java 17 features and get insight on upgrading your Java to version 17...
Read more >Compatibility Guide for JDK 8 - Oracle
This document discusses types of potential incompatibilities relating to the JDK 8 release of the Java platform.
Read more >How to Change Java Versions in Windows (Updated for JDK 18)
How to install multiple Java versions on Windows in parallel? ... Java SE 17 / OpenJDK 17 (→ The most important new features...
Read more >Why and How to Upgrade to Java 16 or 17 - InfoQ
Java 17, the next Long Term Support (LTS) release, will be released on September 14, 2021. This article explains why you should upgrade...
Read more >Java -version shows java 8 while java 11 is installed
4. look at your PATH environment variable. · 3. Open a Windows command prompt window and type the command where java . ·...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is the strategy that the extension uses:
spring-boot.ls.java.home
)java.home
)JAVA_HOME
env variablePATH
env variableThe problem might be that the check for the JDK >= 11 happens after this strategy found a JDK (from top to bottom), it does not continue the search if one of the found JDKs is < 11. In your case it looks like the first two options are not set, then
JAVA_HOME
is found pointing to a JDK and is used, but then recognized as JDK < 11.So we could improve the strategy to continue the search if the found JDK is not >= 11 as well as add additional locations to the list of searched locations. WDYT?
@dsyer Any feedback from the Codespaces team about the wrong JDK appearing on the JDK17 path?