Skip to content

Spring Boot Tools for VS Code incorrectly misidentifies internal JDK for Language Support for Java as a JRE #715

@alvint

Description

@alvint

Now that Language Support for Java is platform-specific, it embeds a JDK by default. On my linux VM (which I connect to via Remote-ssh), the path to this JDK is ~/.vscode-server/extensions/redhat.java-1.2.0/jre/17.0.1-linux-x86_64/.

However, if I try to use this JDK for Spring Boot Tools by setting spring-boot.ls.java.home, it complains that it's a JRE (see picture). My guess is the extension is simply checking the path for the string "jre" to determine if it's a JRE or JDK.

The way I see it, there are two issues that need to be addressed:

  • a more robust check needs to be done to determine if the folder is a JDK or JRE
  • since Spring Boot Tools requires Language Support for Java, and Language Support for Java now includes a JDK by default, Spring Boot Tools should scan for and automatically use this JDK by default, if it's not overridden by spring-boot.ls.java.home (OK, this part is more of an enhancement)

To reproduce, set spring-boot.ls.java.home to a JDK whose path includes the string "jre".


Screen Shot 2022-01-13 at 08 20 51

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions