[BUG] jdtls-lsp Plugin Fails on Windows Due to Incorrect File URI Construction
Summary
The jdtls-lsp plugin fails to initialize on Windows because Claude Code's LSP client constructs invalid file URIs using backslashes and only two slashes instead of three.
Environment
- OS: Windows 10 (MINGW64_NT-10.0-19045)
- Claude Code Version: 2.1.17
- Plugin: jdtls-lsp@claude-plugins-official v1.0.0
- Java Version: 21+
- Working Directory:
C:\code\agentic-app
Actual Behavior
The LSP client constructs invalid file URIs:
file://C:\code\agentic-app
(Two slashes, backslashes in path)
Expected Behavior
The LSP client should construct valid file URIs following RFC 8089 for Windows paths:
file:///C:/code/agentic-app
(Three slashes, forward slashes in path)
Error Messages/Logs
## Error Message
2026-01-23T10:25:10.076Z [DEBUG] [LSP SERVER plugin:jdtls-lsp:jdtls] Jan 23, 2026 10:25:10 A.M. org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError
SEVERE: Internal error: Illegal character in authority at index 9: file://C:\code\agentic-app
java.lang.IllegalArgumentException: Illegal character in authority at index 9: file://C:\code\agentic-app
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)
...
Caused by: java.net.URISyntaxException: Illegal character in authority at index 9: file://C:\code\agentic-app
...
2026-01-23T10:25:10.080Z [DEBUG] [LSP PROTOCOL plugin:jdtls-lsp:jdtls] Received response 'initialize - (0)' in 10271ms. Request failed: Internal error. (-32603).
Steps to Reproduce
- Install Claude Code on Windows
- Install jdtls-lsp plugin:
claude plugin install jdtls-lsp - Navigate to any directory with Java files (e.g.,
C:\code\agentic-app) - Start Claude with debug flag:
claude --debug - Try to use LSP functionality on a Java file
- Check debug logs in
C:\Users\<username>\.claude\debug\<session-id>.txt
Additional Context
- The jdtls wrapper script at
C:\Users\<username>\bin\jdtlsis working correctly - The Eclipse JDT.LS server itself is properly installed and functional
- This appears to be a Windows-specific path handling issue in the LSP client
Root Cause
The issue is in Claude Code's built-in LSP client for Windows, not in the jdtls script itself. The LSP client is sending incorrectly formatted file URIs during the initialization handshake.
Problems:
- Using
file://(2 slashes) instead offile:///(3 slashes) - Using backslashes (
\) in the path instead of forward slashes (/) - The backslashes are interpreted as illegal characters in the URI authority component
Impact
- jdtls-lsp plugin is completely non-functional on Windows
- Users cannot get Java language server features (autocomplete, go-to-definition, refactoring, etc.)
- Affects all Windows users trying to use Java development features in Claude Code
Workaround
None currently available. The issue is in Claude Code's core LSP client implementation.
Claude Model
Sonnet (default)
Is this a regression?
No
Last Working Version
n/a
Claude Code Version
2.1.17
Platform
AWS Bedrock
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗