sublimelsp / LSP-jdtls

Convenience package for the Eclipse JDT language server

Home Page:https://packagecontrol.io/packages/LSP-jdtls

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FileNotFoundError: [Errno 2] No such file or directory: 'java'

ilmoralito opened this issue · comments

Sublime 4113
Ubuntu 22.04.1
java version 17.0.3-tem

When opening a .java file I am receiving the following error message:

Unable to start subprocess for jdtls
FileNotFoundError: [Errno 2] No such file or directory: 'java'

In order to fix I try

LSP-jdtls settings

{
    "java.home": "/home/mario/.sdkman/candidates/java/current"
}

But the error message doesn't go away.

I installed java using sdkman. Greetings in advance

I don't know much about this server but I know that your setting is invalid. The java.home should be inside a settings object. Look at default settings and replicate the same structure.

Thanks for answering. My mistake. I haven't noticed

This setup works as expected

{
    "settings": {
        "java.home": "/home/username/.sdkman/candidates/java/current"
    },
}