coc-java icon indicating copy to clipboard operation
coc-java copied to clipboard

referencedLibraries / classpath additions not working

Open vcavallo opened this issue 4 years ago • 2 comments

I'm not sure where I'm going wrong, I have

  "java.project.referencedLibraries": [
    "/home/something/a-file.jar",
    "/home/something/another-file.jar"
  ],

Set up in both a local and global coc-settings json (for good measure), but the referenced libraries are still "package xyz not found" in the editor.

I'm running Java 8 and successfully set up the language server by installing an older version (as mentioned in https://github.com/neoclide/coc-java/issues/99). Everything else seems to be working fine except for this additional classpath problem.

Any ideas? thanks.

vcavallo avatar Mar 09 '21 16:03 vcavallo

I'm beginning to suspect that these files are ignored altogether. I have "java.errors.incompleteClasspath.severity": "ignore"

Set (in fact, Coc created this setting itself when I responded to a prompt), but the errors are still shown.

vcavallo avatar Mar 09 '21 16:03 vcavallo

While I don't have a solution, you might be able to work around it by using the .classpath file instead: http://eclim.org/vim/java/classpath.html

Ontonator avatar Apr 09 '21 06:04 Ontonator

Try command

`java.project.addToSourcePath.command: Add Folder to Java Source Path`: adds the selected folder to its project source path.

chemzqm avatar Jan 29 '23 09:01 chemzqm