-
Notifications
You must be signed in to change notification settings - Fork 409
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
"Permission Denied" and "Failed to retrieve libraries" when running jdtls with JDK 8 in Linux #2967
Comments
@LakshyAAAgrawal Could you run
|
username@machinename:/path/to/dir$ ls -l path/to/downloaded/binaries/jdks/openlogic-openjdk-8u392-b08-linux-x64/bin/java
---x------ 1 USERNAME USERDOMAIN users 8776 Oct 18 15:23 path/to/downloaded/binaries/jdks/openlogic-openjdk-8u392-b08-linux-x64/bin/java
username@machinename:/path/to/dir$ path/to/downloaded/binaries/jdks/openlogic-openjdk-8u392-b08-linux-x64/bin/java -version
openjdk version "1.8.0_392-392"
OpenJDK Runtime Environment (build 1.8.0_392-392-b08)
OpenJDK 64-Bit Server VM (build 25.392-b08, mixed mode) |
You can try
|
I tried the above command, and have also tried giving the jdk8 binaries all permissions (777) with chmod. It still gives the same error. Regarding reinstalling JDK, I have already tried with 3 different packages of JDK-8 (linked above). I downloaded JDK-17 in exactly the same way, and the binaries from JDK-17 have exactly the same permissions as above, but it works fine, while JDK-8 is the only one causing the issue. |
Can you try adding the following as a system property to the JDT-LS launch : See https://github.com/redhat-developer/vscode-java/blob/b1d08312b3d986368afbbe56e9271b4f9d6758fc/src/javaServerStarter.ts#L136 as an example of a client that does this. @mickaelistria , looks like |
This comment was marked as resolved.
This comment was marked as resolved.
is a recurrring issue with some VM installations. I've not been able to reproduce it myself to fix it, but there are issue such as eclipse-jdt/eclipse.jdt.core#1190 which show that under some circumstances, JDT fails. Note that the DetectVM job has received improvements in the last months. So can you please first check the version of org.eclipse.jdt.launching that is being used when reproducing this issue? |
They appear to be extracting the JDT-LS runtime directly out of the vsix we publish. For 1.23.0 (JDT-LS 1.28.0) we used the 4.29 release, so |
I've expanded https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u392-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u392b08.tar.gz in my |
I actually just uninstalled the system level jdk-8 installed at the above path (sudo apt remove openjdk-8-*), before reading your comment, so unfortunately, I can't confirm. However, there are other system-level jdks installed and:
The above reported issue still persists after uninstalling the system level jdk-8.
I added the above as well, and the same issue still persists. As pointed out by rightly by @rgrunber, I download the vsix from https://github.com/redhat-developer/vscode-java/releases/download/v1.23.0/[email protected] and use the jdtls packaged in it. Kindly let me know if I should use a more recent vsix package and I can get back to you with results on the updated version. |
The JDK that is failing, When JDT-LS is started, can you run
You'd want that to match the user that owns the binary. |
I am trying to add JDK-17 and JDK-8 runtimes support to multilspy. While it works perfectly with JDK-17, and JDK-8 on windows, when I try to run the same with JDK-8 on Linux, Eclipse crashes saying there are permission errors. I have ensured the permissions for the JDK8 binary files are the same as those for the JDK17 binaries. Further, I have tried with JDK 8 packages downloaded from https://builds.openlogic.com/downloadJDK/openlogic-openjdk/8u392-b08/openlogic-openjdk-8u392-b08-linux-x64.tar.gz, https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u392-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u392b08.tar.gz and https://www.oracle.com/java/technologies/javase/javase8u211-later-archive-downloads.html#license-lightbox. I am able to run the java binary from all of the above packages from my shell, however the permission errors arise with all of the packages. The full client<->server communication trace is available at https://pastebin.com/45xSNiqH. The server is launched with JDK17, and I pass the path to JDK17 and JDK8 through the settings.java.configuration.runtimes configuration option.
Also, note that I did not supply the path of
/usr/lib/jvm/java-8-openjdk-amd64
in the runtimes key above, and it was instead found automatically by the server (see logs below).I get the following errors in window/logMessage:
Error message from server to client:
stderr output of jdt.ls:
The text was updated successfully, but these errors were encountered: