Problems with manual installation of `jdtls`
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- emacs-lisp, java, nixos
- Domain
- developer-experience, tooling
Research direction
No source file or test is named in the report. Start with the manual-installation path controlled by lsp-java-server-install-dir, then trace how the launcher handles the read-only Nix store and resolves the jdtls executable. Done means the reported manual jdt-language-server setup works without writing to the Nix Store and its executable naming is addressed.
Written by the indexing model from the issue text.
Description
This is not really a bug, more of a question.
I am trying to use lsp-java with a manual installation of jdtls. I use NixOS, and provide the language server, which is called jdt-language-server in Nixpkgs, in the environment. I also set lsp-java-server-install-dir to point to the correct directory. However, lsp-java fails to run because the installation directory of jdt-language-server is in the Nix Store, and therefore read-only, which leads to several errors. For example,
!STACK
java.nio.file.FileSystemException: /nix/store/4qvyvcbn6h1sm8dvx9wjrv3y5az1znp2-jdt-language-server-1.19.0/share/java/config_linux: Read-only file system
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:397)
at java.base/java.nio.file.Files.createDirectory(Files.java:700)
at java.base/java.nio.file.Files.createAndCheckIsDirectory(Files.java:807)
at java.base/java.nio.file.Files.createDirectories(Files.java:793)
at org.eclipse.equinox.launcher.Main.extractFromJAR(Main.java:2313)
at org.eclipse.equinox.launcher.Main.getLibraryFromFragment(Main.java:535)
at org.eclipse.equinox.launcher.Main.getLibraryPath(Main.java:495)
at org.eclipse.equinox.launcher.Main.setupJNI(Main.java:448)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:579)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
at org.eclipse.equinox.launcher.Main.main(Main.java:1440)
Further, I read somehwere that the language server executable name jdtls is hardcoded into lsp-java. Is this so? (NixOS uses jdt-language-server).
I should note that everything works fine when using the jdtls installation method provided by lsp-java.
- Dominant language
- Emacs Lisp
- Stars
- 696
- Forks
- 97
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from emacs-lsp/lsp-java
-
dap-java discards module paths from resolveClasspath causing JPMS-modular projects fail to launchOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
All issues in emacs-lsp/lsp-java
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
gruntwork-io/boilerplate#329 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
freeCodeCamp/curriculum-helpers#607 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
PedestrianDynamics/pyFDS-Evac#326 ·
Maintainers usually reply within 1 day