Skip to content

Java LSP (jdtls) does not work on Zed Remote Server (WSL/NixOS) while other LSP works #299

Description

@anshiq

Relevance Confirmation

  • I confirmed that this is not an issue with the Eclipse JDT Language Server itself

What happened?

Environment

  • Host: Windows
  • Remote: NixOS running in WSL
  • Editor: Zed 1.13.2 5cdb7ab9d9546db683132cfa78e68acec3064cac – \?\C:\Users\my_user_name\AppData\Local\Programs\Zed\Zed.exe
  • Java extension: Installed
  • Jdtls: In global PATH
  • Other Lsp gopls: Works correctly

Language Servers

Both language servers are installed and available in the remote environment.

$ which gopls
/etc/profiles/per-user/nixos/bin/gopls

$ which jdtls
/etc/profiles/per-user/nixos/bin/jdtls

Expected Behavior

Opening a Test.java file or a Java project on the remote server should start jdtls and provide Java language features (diagnostics, completion, navigation, etc.), just like Go does with gopls.

Actual Behavior

  • Go projects work correctly.
  • Java projects do not start the language server.
  • No Java language features are available.

Log Output

The only relevant error I can find is:

/home/nixos/.local/share/zed/logs/server-workspace-55.log

{"level":3,"module_path":"extension_host::headless_host","file":"crates/extension_host/src/headless_host.rs","line":99,"message":"(remote server) failed to load extension: java-eclipse-jdtls, No extension manifest found for extension java-eclipse-jdtls"}

What I've Tried

  • Installed the Java extension in Zed.
  • Verified jdtls is installed and available in PATH.
  • Modified both global and ~/.config/zed/settings.json multiple times using various configurations found online.
  • Restarted the remote server multiple times.
  • Created hard symlink at ~/.local/share/zed/extensions/work/java-eclipse-jdtls/eclipse.jdt.ls/bin for both names jdtls & java-eclipse-jdtls

Nothing has resolved the issue.

Additional Information

  • Java works correctly when using Zed locally on Windows.
  • The issue only occurs when using the Zed Remote Server connected to my NixOS WSL environment.
  • Go (gopls) works perfectly in the exact same remote setup, so remote LSP functionality appears to be working in general.
  • This jdtls binary working I tried with helix editor and neovim.

Is there something specific required for Java extensions on the remote server? The log suggests the remote server cannot find the extension manifest:

Could this indicate that the Java extension is not being installed or synchronized to the remote server?
If anything you need to get from me like logs output, config(since I changed many time it is mess right now) or something tell me I will give you that also.

What did you expect to happen?

I work in spring boot and my other dev setup for golang and frontend is in wsl, So I would be good If I can move my java backend services in wsl also

Environment

Zed: Zed 1.13.2 5cdb7ab9d9546db683132cfa78e68acec3064cac – \?\C:\Users\anshi\AppData\Local\Programs\Zed\Zed.exe
Platform: Wsl (nixos latest) inside window 11 latest.
Java: OpenJDK v21.0.6

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