Provide a way to disable embedded JRE
See original GitHub issueThe 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:
no such file or directory: /home/user/.vscode/extensions/redhat.java-1.2.0/jre/17.0.1-linux-x86_64/bin/java
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.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
How to disable Java extension mechanism - Stack Overflow
I've been unable to determine how I can disable this extension mechanism when invoking the JRE embedded in our app. How can I...
Read more >9 Deploy Your JRE to the Embedded Device (Release 8)
Recursively copy destDir from the host to the device directory where you want the JRE installed. For example: · If necessary, update the...
Read more >How to use your own JRE instead of the ... - BMC Communities
Go to $HOME/ctm/cm/AFT directory if Agent installed as standalone or to $HOME/ctm_agent/ctm/cm/AFT directory in case the Agent was installed as part of the ......
Read more >4 Ways to Change JRE for Tomcat - CodeJava.net
1. Changing JRE by updating JAVA_HOME or JRE_HOME. This way is very simple to implement but it works only for Tomcat installed from...
Read more >How to change the version of JRE for Collaborator installed ...
Remove the bundled JRE package from your PC manually: Collaborator server: Stop the Collaborator server service. Navigate to its installation folder. Delete the ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

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