You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
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.
@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 🙂
@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?
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.
@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!
Activity
MrSubidubi commentedon Oct 3, 2025
Nope, that's the proper place. Thanks for the report!
MrSubidubi commentedon Oct 3, 2025
I'll trigger a new release with another fix and would be interested if you are still running into this after. Thanks!
Arthurm1 commentedon Oct 6, 2025
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.
MrSubidubi commentedon Oct 6, 2025
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.
playdohface commentedon Oct 11, 2025
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.
MrSubidubi commentedon Oct 11, 2025
@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 🙂
playdohface commentedon Oct 18, 2025
@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?
Arthurm1 commentedon Oct 19, 2025
@playdohface I need to download source locally, install Rust and compile to do that?
MrSubidubi commentedon Oct 19, 2025
@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.
Arthurm1 commentedon Oct 19, 2025
I get
Could not find Java executable in JAVA_HOME or on PATHMy
JAVA_HOMEis defined asC:\Program Files\Java\jdk-25+36which is fine. And thebindir is on the PATH.I don't know Rust, but attempting to drill into the error I think
fs::metadata(&java_executable)givesOperation not permitted (os error 63). Hence it finds no java executable.Is this a wasm sandboxing thing?
Arthurm1 commentedon Oct 19, 2025
It works if I remove the metadata checks and just use...
playdohface commentedon Oct 20, 2025
@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_HOMEis set I guess we can assumeJAVA_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!playdohface commentedon Oct 20, 2025
It should work now:
#100
Arthurm1 commentedon Oct 20, 2025
@playdohface Thanks!