jdtls-lsp Plugin Fails on Windows Due to Invalid File URI Format
Summary
The jdtls-lsp plugin fails to initialize on Windows because Claude Code sends Windows file paths with backslashes to the LSP server, resulting in an invalid URI format.
Environment
- Claude Code Version: 2.1.5
- OS: Windows 10/11 (MSYS_NT-10.0-26200)
- Java Version: OpenJDK 21.0.9 (via Scoop)
- jdtls Version: 1.56.0-202601071638 (via Scoop)
- Plugin: jdtls-lsp@claude-plugins-official v1.0.0
Steps to Reproduce
- Install jdtls via Scoop:
scoop install jdtls - Enable jdtls-lsp plugin in
.claude/settings.local.json:
``json``
{
"enabledPlugins": {
"jdtls-lsp@claude-plugins-official": true
}
}
- Open a Java/Maven project with Claude Code
- Check debug logs for LSP initialization errors
Expected Behavior
The jdtls LSP server should initialize successfully and provide Java code intelligence.
Actual Behavior
LSP initialization fails with the following error:
SEVERE: Internal error: Illegal character in authority at index 9: file://C:\Users\username\path\to\project
java.lang.IllegalArgumentException: Illegal character in authority at index 9: file://C:\Users\username\path\to\project
at java.base/java.net.URI.create(URI.java:932)
at org.eclipse.jdt.ls.core.internal.ResourceUtils.canonicalFilePathFromURI(ResourceUtils.java:225)
at org.eclipse.jdt.ls.core.internal.handlers.BaseInitHandler.handleInitializationOptions(BaseInitHandler.java:109)
Root Cause Analysis
Claude Code is sending the workspace path to jdtls in an invalid URI format:
| Issue | Value |
|-------|-------|
| Sent by Claude Code | file://C:\Users\username\Desktop\project |
| Expected RFC 8089 Format | file:///C:/Users/username/Desktop/project |
The Windows backslashes (\) are being interpreted as invalid characters in the URI authority component.
Additional Issue Found
The marketplace.json configuration for jdtls-lsp and kotlin-lsp plugins includes a startupTimeout field that is not yet implemented:
[ERROR] Failed to initialize LSP server plugin:jdtls-lsp:jdtls:
LSP server 'plugin:jdtls-lsp:jdtls': startupTimeout is not yet implemented.
Remove this field from the configuration.
Location: ~/.claude/plugins/marketplaces/claude-plugins-official/.claude-plugin/marketplace.json
Affected plugins:
jdtls-lsp(line ~230):"startupTimeout": 120000kotlin-lsp(line ~189):"startupTimeout": 120000
Suggested Fix
- For the URI format issue: Convert Windows paths to proper file URIs before sending to LSP servers:
``javascriptfile:///${windowsPath.replace(/\/g, '/')}
// Example fix
const fileUri = ;``
- For the startupTimeout issue: Remove the
startupTimeoutfield from marketplace.json or implement support for it.
Workaround
For the startupTimeout issue, users can manually edit:~/.claude/plugins/marketplaces/claude-plugins-official/.claude-plugin/marketplace.json
And remove the "startupTimeout": 120000 lines from jdtls-lsp and kotlin-lsp configurations.
However, there is currently no workaround for the Windows URI format issue.
Debug Logs
Relevant log entries from ~/.claude/debug/*.txt:
2026-01-12T08:16:09.523Z [DEBUG] [LSP PROTOCOL plugin:jdtls-lsp:jdtls] Sending request 'initialize - (0)'.
2026-01-12T08:16:17.577Z [DEBUG] [LSP SERVER plugin:jdtls-lsp:jdtls] SEVERE: Internal error: Illegal character in authority at index 9: file://C:\Users\...
2026-01-12T08:16:17.579Z [DEBUG] [LSP PROTOCOL plugin:jdtls-lsp:jdtls] Received response 'initialize - (0)' in 8055ms. Request failed: Internal error. (-32603).
2026-01-12T08:16:17.579Z [ERROR] Error: Error: LSP server plugin:jdtls-lsp:jdtls initialize failed: Internal error.
Impact
- All LSP plugins that receive file paths are likely affected on Windows
- Users cannot use Java code intelligence features via jdtls-lsp
- Similar issues may affect other LSP plugins (kotlin-lsp, csharp-lsp, etc.)
17 Comments
Can confirm this issue on Windows 11 with Claude Code 2.1.11
Environment:
Error in logs:
LSP error: plugin:jdtls-lsp:jdtls - ENOENT: no such file or directory, uv_spawn 'jdtls'
Observations:
This suggests the LSP manager has two issues on Windows:
The URI format issue mentioned in this thread is likely compounding the problem.
+1
I am able to load with it in using this wrapper
jdtls_proxy.py
Edit marketplace.json:
and jdtls.bat:
Seems like very minor error that could be addressed quickly, but I don't think they are any humans from Anthropic on this whole repo.
There is also a non fatal error about not being able to read "marketplace.json":
Frankly I don't know who let this into a release buid ... Claude is great, but this is an absolute MESS.
The same for me. jdtls-lsp is not working on Windows.
Do these defects actually get looked at? Also. I don't see the point of releasing functionality that hasn't been tested. These are not edge cases, these are basic smoke test type defects.
Maybe if these this issue gets enough attention and there are many duplicates somehow it bubbles up as something that actually gets worked on. Another issue was closed as a duplicate and linked here by Claude itself. So there is some kind of awareness of it.
Still reproduces as of 2.1.45
It needs 10 upvotes to "bubble up" - get your friends on the case.
Still happening in 2.1.71
I cannot believe how long this has been going on. I also created a proxy, using Java, to convert the URL format, but I cannot share it with the rest of my team that way - the underlying issue needs resolving!
reproduces on v2.1.78
Same on 2.1.80 with php-lsp
Still reproducing on v2.1.87
still reproducing in v2.1.97
I have a practical solution, and the specific steps are as follows:
D:\Tools\jdtlsD:\Tools\jdtls\binto your PATH environment variable.~\.claude\plugins\marketplaces\claude-plugins-official\.claude-plugin\marketplace.jsonfile and search forjdtls."command": "jdtls"to"command": "jdtls.bat":``
json
``"lspServers": {
"jdtls": {
"command": "jdtls.bat",
"extensionToLanguage": {
".java": "java"
},
"startupTimeout": 120000
}
}
note that: jdtls-1.58.0 required jdk-version is 21 but not 17.
@Pcyslist I was doing the same, but this configuration keeps getting restored to the defaults. It seems like Claude Code pulls marketplace settings every new session or periodically.
I made a hook that overwrites those settings on session startup.
It works.
6 new issues have been created and linked here by the bots. Why can't you use Claude to fix this?