Skip to content

Conversation

@acottis
Copy link

@acottis acottis commented Nov 7, 2025

On windows using JDT Language server the LSP would crash on opening a .java file in which it would not resolve a root path when calling find_lsp_workspace.

This is because the JDT language server does not accept non URI paths on windows for example C:\foo\bar which is being passed by the root_path variable.

If we always set root_uri when possible it will use that and get the correctly formatted file:// URI.

To reproduce this issue on windows you just need to make create a java file anywhere it will not find the lsp workspace, for example hx C:\tmp\main.java then look at the log and see the below:

2025-11-07T21:27:19.374 helix_lsp::transport [ERROR] jdtls err <- "Caused by: java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\\tmp\r\n"

I am not very familiar with the codebase so not sure of why we cant do this, just wanted to make a PR as it resolved my issue. Not sure about the implications on other OS's language servers.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant