Relevance Confirmation
According to eclipse-jdtls/eclipse.jdt.ls#2491
What happened?
When opening a java project that exists in a folder whose path contains spaces, JDTLS fails to start and this error appears:
java.lang.IllegalArgumentException: Illegal character in path at index 24: file:///my/path with/spaces
at java.base/java.net.URI.create(URI.java:938)
at org.eclipse.jdt.ls.core.internal.ResourceUtils.canonicalFilePathFromURI(ResourceUtils.java:225)
at org.eclipse.jdt.ls.core.internal.handlers.BaseInitHandler.handleInitializationOptions(BaseInitHandler.java:117)
at org.eclipse.jdt.ls.core.internal.handlers.InitHandler.handleInitializationOptions(InitHandler.java:95)
at org.eclipse.jdt.ls.core.internal.handlers.BaseInitHandler.initialize(BaseInitHandler.java:68)
at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.initialize(JDTLanguageServer.java:287)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$recursiveFindRpcMethods$0(GenericEndpoint.java:65)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:128)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:271)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:201)
at org.eclipse.jdt.ls.core.internal.ParentProcessWatcher.lambda$1(ParentProcessWatcher.java:86)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:185)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:97)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:114)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:330)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
at java.base/java.lang.Thread.run(Thread.java:1516)
Caused by: java.net.URISyntaxException: Illegal character in path at index 24: file:///my/path with/spaces
at java.base/java.net.URI$Parser.fail(URI.java:3005)
at java.base/java.net.URI$Parser.checkChars(URI.java:3176)
at java.base/java.net.URI$Parser.parseHierarchical(URI.java:3258)
at java.base/java.net.URI$Parser.parse(URI.java:3206)
at java.base/java.net.URI.<init>(URI.java:651)
at java.base/java.net.URI.create(URI.java:936)
... 20 more
What did you expect to happen?
It should start up fine. The same exact folder works for me if moved to a path that does not contain spaces.
Environment
Zed: 0.233.10
Platform: Arch Linux
Java: openjdk 26.0.1
Relevance Confirmation
According to eclipse-jdtls/eclipse.jdt.ls#2491
What happened?
When opening a java project that exists in a folder whose path contains spaces, JDTLS fails to start and this error appears:
What did you expect to happen?
It should start up fine. The same exact folder works for me if moved to a path that does not contain spaces.
Environment
Zed: 0.233.10
Platform: Arch Linux
Java: openjdk 26.0.1