-
Notifications
You must be signed in to change notification settings - Fork 414
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
Provide a way to disable embedded JRE #2276
Comments
@cydparser @testforstephen FYI, looks that the embedded JDK is not working on some unpopular Linux distros. |
As far as I know (microsoft/vsmarketplace#288 (comment)), NixOS is not installing extensions via VS Code marketplace, but explicitly download Java extension from the specified URL. If so, can NixOS download the generic version without embedded JRE from the URL https://github.com/redhat-developer/vscode-java/releases/download/v1.2.0/redhat.java-1.2.0.vsix? Besides, if NixOS doesn't follow FHS directory structure, how would you install JDK on NixOS? |
@testforstephen NixOS installs everything in /nix/store/ and creates symlinks in either /run/current-system/sw/ for system installs or ~/.nix-profile/ for user installs. |
Another idea I had was that we could detect if the underlying Linux distribution follows the traditional FHS and automatically disable the embedded JRE if it is running on a non-FHS distribution. Update: We can try to run the command "java -version" using the embedded JRE executable, and if it fails, disable embedded JRE. |
Next version 1.3.0 will have a new setting "java.jdt.ls.java.home" that allows you to use a different JDK to start Java extension. |
The embedded JRE assumes a traditional FHS directory structure on Linux. Nontraditional distributions, like NixOS, do not have directories like /lib and so the embedded Java executable cannot be used. The following opaque error occurs when opening a Java file on NixOS:
The file exists, but it requests a nonexistent interpreter, /lib64/ld-linux-x86-64.so.2. Deleting the jre directory allows me to use the extension, but that is an unpleasant user experience. A setting to ignore the embedded JRE would be appreciated.
The text was updated successfully, but these errors were encountered: