Skip to content

[codespaces] spring boot extension doesn't find the right JDK when connecting to a codespace #670

Closed
@martinlippert

Description

@martinlippert

Describe the bug
I am using this devcontainer sample:
https://github.com/martinlippert/codespaces-spring-test

I added a setting to specify the exact JDK for the Spring Boot tooling to use here:
https://github.com/martinlippert/codespaces-spring-test/blob/main/.devcontainer/devcontainer.json#L22

With that line, the JDK is found in a reliable way by the Spring Boot extension, but it is somewhat cumbersome that users have to specify this, even though the java.home setting is there automatically and works for the Java extension.

The interesting case here is:

  • when I run the Codespaces workspace in a browser (Chrome in my case), the Spring Boot extension picks up the right JDK (the same as the java.home is pointing to). If I connect my desktop installation of VSCode to that Codespace, it cannot start the extension. If I add that the JDK config explicitly, it works, but not without it.

We should really try to make this work out-of-the-box for both scenarios (browser + desktop) for the standard Codespaces java workspace - without requiring the user to add the config manually.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions