Skip to content

Can't run extension under Windows #86

Closed

Description

@Arthurm1

What happened?

I'm running Zed Windows Beta and trying to install the Java extension.

I've got no experience with Zed before.

I don't know if I have the settings correct as the example settings on the Zed website here show a different location for settings: (lsp/jdtls/initialization_options/settings) than this repo's example does here (lsp/jdtls/settings).

Is the one on zed.dev correct? It seems correct. It does seem as though I can write what I want in the settings - I'm guessing there is no schema validation for extension settings unlike with VSCode?

The error I'm getting is...

Language server jdtls:

from extension "Java" version 6.4.1: prefix not found

Is there a way to get more verbose error logging? Does this mean that I've got a setting missing/incorrect? Is the error coming from this extension or from jtdls?

The logs show...

2025-10-02T12:49:37+01:00 INFO  [lsp] starting language server process. binary path: "C:\\Users\\XXXX\\AppData\\Local\\Zed\\node\\node-v22.5.1-win-x64\\node.exe", working directory: "C:\\myproject", args: ["C:\\Users\\XXXX\\AppData\\Local\\Zed\\languages\\json-language-server\\node_modules/vscode-langservers-extracted/bin/vscode-json-language-server", "--stdio"]
2025-10-02T12:49:37+01:00 ERROR [project::lsp_store] Failed to start language server "jdtls": from extension "Java" version 6.4.1: prefix not found

Should I be posting this on the Zed issues board? I haven't tried any other extensions.

What did you expect to happen?

I expect the extension to start

Environment

Zed: v0.208.0
Platform: Windows 11 Pro 10.0.26100 build 26100

Activity

  1. added theissue type on Oct 2, 2025
  2. MrSubidubi commented on Oct 3, 2025

    @MrSubidubi
    Contributor

    Nope, that's the proper place. Thanks for the report!

  3. MrSubidubi commented on Oct 3, 2025

    @MrSubidubi
    Contributor

    I'll trigger a new release with another fix and would be interested if you are still running into this after. Thanks!

  4. Arthurm1 commented on Oct 6, 2025

    @Arthurm1
    Author

    Thanks for the new version.

    It gets a bit further but then fails with jdtls.bat. jdtls.bat requires Python 3.9 which I don't have installed on this machine.

    Here's an example without Python - can this be done instead?

    Here's how Red Hat construct the executable for VSCode.

    Here's the Python script itself which is simpler than the VSCode example.

  5. MrSubidubi commented on Oct 6, 2025

    @MrSubidubi
    Contributor

    Thanks for getting back, good to hear you at least got a bit further.

    I am not too involved here, but what you run into is obviously not optimal and definitely seems like a worthy improvement. Could you perhaps update the issue accordingly so this becomes more evident for people looking at the issues? The context you provide is great, but I think it would be a good improvement to hint people at the issue at a first sight.

    I unfortunately won't be able to get to this soon, very limited on time currently, sorry, but I hope someone from the community might pick this up to improve things, a contribution here would surely be welcome (and I'd definitely take a look at it)! In any case though, thank you for the digging you did yourself, much appreciated.

  6. playdohface commented on Oct 11, 2025

    @playdohface
    Collaborator

    I think removing the Python dependency is just a matter of rewriting the launch script in Rust. I would be happy to do it, but this will almost certainly conflict with my other open PR (the one that enables offline use). Could someone make time to have a look at it? It shouldn't take long, it's mostly just moving code into functions and wrapping them in fallback logic.
    I'm daily driving this extension at work, so I'm happy to spend some time on improving it in general.

  7. MrSubidubi commented on Oct 11, 2025

    @MrSubidubi
    Contributor

    @playdohface Sent you an invite. Feel free to ping me whenever you have questions or are unsure about things (e.g. you can also self-review and ping me if you have specific questions in your PR), happy to look at whatever comes up. Hope that works for you, otherwise feel free to mention it 🙂

  8. playdohface commented on Oct 18, 2025

    @playdohface
    Collaborator

    @Arthurm1 I've just merged #97 which should make it possible to use this extension without python. Would you mind trying to run the latest main as a dev extension and reporting whether or not it works for you now?

  9. Arthurm1 commented on Oct 19, 2025

    @Arthurm1
    Author

    @playdohface I need to download source locally, install Rust and compile to do that?

  10. MrSubidubi commented on Oct 19, 2025

    @MrSubidubi
    Contributor

    @Arthurm1 See https://zed.dev/docs/extensions/developing-extensions#developing-an-extension-locally for a step-by-step guide, you need rust installed via rustup, then you can just install the dev extension via the steps provided.

  11. Arthurm1 commented on Oct 19, 2025

    @Arthurm1
    Author

    I get Could not find Java executable in JAVA_HOME or on PATH

    My JAVA_HOME is defined as C:\Program Files\Java\jdk-25+36 which is fine. And the bin dir is on the PATH.

    I don't know Rust, but attempting to drill into the error I think fs::metadata(&java_executable) gives Operation not permitted (os error 63). Hence it finds no java executable.

    Is this a wasm sandboxing thing?

  12. Arthurm1 commented on Oct 19, 2025

    @Arthurm1
    Author

    It works if I remove the metadata checks and just use...

    let java_executable = PathBuf::from(java_home)
          .join("bin")
          .join(java_executable_filename);
    return Ok(java_executable);
  13. playdohface commented on Oct 20, 2025

    @playdohface
    Collaborator

    @Arthurm1 you're right, there is a good chance we can't actually see your JAVA_HOME from within the extension. I think those checks are not really necessary to begin with, if JAVA_HOME is set I guess we can assume JAVA_HOME/bin/java(.exe) to be there. I'll prepare a fix when I can make the time (or feel free to open a PR with the removed metadata checks), thanks for checking!

  14. playdohface commented on Oct 20, 2025

    @playdohface
    Collaborator

    It should work now:
    #100

  15. Arthurm1 commented on Oct 20, 2025

    @Arthurm1
    Author

    @playdohface Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions