Environment
- OS: Windows
- Extension version: 6.8.25
Description
When lsp.jdtls.settings.lombok_jar is set to an absolute Windows path (as documented in the README), JDTLS fails to start.
Steps to reproduce
- Set in
settings.json:
"lsp": {
"jdtls": {
"settings": {
"lombok_jar": "D:\path\to\lombok-1.18.36.jar"
}
}
}
- Open any Java file.
Actual behavior
The language server resets the connection. The log shows:
initializing server jdtls, id 1: Server reset the connection
-- stderr --
Error opening zip file or JAR manifest missing : <USERPROFILE>/AppData/Local/Zed/extensions/work/java/D:/path/to/lombok-1.18.36.jar
The configured absolute path is concatenated onto the extension workdir instead of being used as-is.
Expected behavior
The configured absolute path is passed to JDTLS as the -javaagent argument without modification.
Root cause
In src/jdtls_server.rs, command() builds the agent argument with current_dir.join(lombok_jar_path). The extension runs as WASM, which uses POSIX path semantics — a Windows drive-qualified path like D:\... is not treated as absolute there, so join() appends it to the workdir. This does not happen on macOS/Linux because POSIX absolute paths start with /.
Also affected
java_debug_jar — src/debugger.rs uses the same current_dir.join(...) pattern in inject_plugin_into_options().
Workaround
Copy the jar into the extension workdir and reference it with a relative path:
extensions/work/java/lombok/lombok-1.18.36.jar
"lombok_jar": "lombok/lombok-1.18.36.jar"
Suggested fix
Only join the configured path with the workdir when it is relative; detect Windows drive-letter paths (e.g. a leading X:\ or X:/ prefix) and use them as-is.
Environment
Description
When
lsp.jdtls.settings.lombok_jaris set to an absolute Windows path (as documented in the README), JDTLS fails to start.Steps to reproduce
settings.json:Actual behavior
The language server resets the connection. The log shows:
The configured absolute path is concatenated onto the extension workdir instead of being used as-is.
Expected behavior
The configured absolute path is passed to JDTLS as the
-javaagentargument without modification.Root cause
In
src/jdtls_server.rs,command()builds the agent argument withcurrent_dir.join(lombok_jar_path). The extension runs as WASM, which uses POSIX path semantics — a Windows drive-qualified path likeD:\...is not treated as absolute there, sojoin()appends it to the workdir. This does not happen on macOS/Linux because POSIX absolute paths start with/.Also affected
java_debug_jar—src/debugger.rsuses the samecurrent_dir.join(...)pattern ininject_plugin_into_options().Workaround
Copy the jar into the extension workdir and reference it with a relative path:
Suggested fix
Only join the configured path with the workdir when it is relative; detect Windows drive-letter paths (e.g. a leading
X:\orX:/prefix) and use them as-is.