Skip to content

Zed settings for lsp.jdtls.settings.classpath seem to be ignored #35

@dpapathanasiou

Description

@dpapathanasiou

Relevance Confirmation

  • I confirmed that this is not an issue with the Eclipse JDT Language Server itself

What happened?

I'm going through the simple calculator example in CUP, and I've downloaded the corresponding jar files in /usr/local/java-cup/.

Using them in the terminal works as expected, but Zed complains that The import java_cup.runtime cannot be resolved (268435846) despite my having this block in my ~/.config/zed/settings.json file:

  "lsp": {
    "jdtls": {
      "settings": {
        "classpath": "/usr/local/java-cup/java-cup-11b.jar:/usr/local/java-cup/java-cup-11b-runtime.jar"
      },
      "initialization_options": {}
    }
  }

I have confirmed that jdtls is running, just lacking the classpath I'm giving it:

$ ps -ef | grep jdtls         
  501 10820 10571   0  5:33PM ??         0:04.89 -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -Dosgi.checkConfiguration=true -Dosgi.sharedConfiguration.area=/Users/denis/Library/Application Support/Zed/extensions/work/java/jdtls/jdt-language-server-1.44.0-202501221502/config_mac -Dosgi.sharedConfiguration.area.readOnly=true -Dosgi.configuration.cascaded=true -Xms1G --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED -jar /Users/denis/Library/Application Support/Zed/extensions/work/java/jdtls/jdt-language-server-1.44.0-202501221502/plugins/org.eclipse.equinox.launcher_1.6.900.v20240613-2009.jar -data /var/folders/c0/3v25x0x932ncxmxksyjky7100000gn/T/jdtls-04df9577c2c8bc17736b0ae73d92dcd9c74e6311

I am running the latest version of this extension, on Zed 0.170.2 (43b8788b290346c856820544dc70d1d13a235516), on macos.

What did you expect to happen?

If the classpath with those CUP jars was being passed to jdtls correctly, I should not be seeing warnings like The import java_cup.runtime cannot be resolved (268435846)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinglanguage-serverRelated to the language server.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions