Skip to content

Extension overwrites JAVA_HOME set by Nix with SDKMAN! #4143

@ThomasVitale

Description

@ThomasVitale

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).

https://github.com/ThomasVitale/vscode-java-nix-issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions