Skip to content

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

Closed

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

Activity

  1. changed the title [-]Spring Boot Tools for VS Code incorrectly misidentifies default Language Support for Java JDK as a JRE[/-] [+]Spring Boot Tools for VS Code incorrectly misidentifies internal JDK for Language Support for Java as a JRE[/+] on Jan 17, 2022
  2. BoykoAlex commented on Jan 17, 2022

    @BoykoAlex
    Contributor

    @kdvolder and I fixed it:

    • Better criteria for JDK d71b70b
    • Use embedded JDK into java ls if it is around 29db241
  3. added this to the 4.13.1.RELEASE milestone on Jan 21, 2022
  4. alvint commented on Feb 4, 2022

    @alvint
    Author

    Works great here. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: vscodetype: enhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions