Skip to content
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

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

Closed
martinlippert opened this issue Aug 10, 2021 · 1 comment
Labels
for: vscode something that is specific for VSCode status: needs-investigation type: bug

Comments

@martinlippert
Copy link
Member

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.

@martinlippert
Copy link
Member Author

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: vscode something that is specific for VSCode status: needs-investigation type: bug
Projects
None yet
Development

No branches or pull requests

1 participant