redhat-developer / redhat-developer/vscode-java
Extension overwrites JAVA_HOME set by Nix with SDKMAN!
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
I use Nix to manage my JDKs. All Nix packages for the different JDK distributions also configure the JAVA_HOME environment variable. This configuration takes precedence over SDKMAN!. In fact, from a Terminal window, everything works correctly. However, when opening the project in Visual Studio Code, the "Language Support for Java(TM) by Red Hat" extension seems to overwrite the value set by Nix with the one from SDKMAN!, even if there's no .sdkmanrc file in that project and the whole session is within the Nix environment context.
I have created a repo with a minimal setup and detailed instructions to reproduce the error (issue number 2 in the README).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal reproduction repository linked in the issue, following issue 2 in its README. Compare JAVA_HOME in a terminal with the value when opening the project in Visual Studio Code, including the session's Nix context and the absence of a .sdkmanrc file. Done means the extension no longer overwrites Nix's JAVA_HOME in this setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, nixos, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100