I recently came across lsp-java and I wanted to give it a try. I was able to install it with no issues and I'm able to add projects to the workspace.
I'm coming across an issue where the LSP server isn't able to find methods from other classes within my projects. Flycheck shows many errors such as:
> The method <methodname> is undefined for the the type <type>
> log cannot be resolved
When I open my projects in VS Code, these errors do not show up. For further context, this is a Spring Boot project that uses Maven. I'm also able to build this project from the shell with no issues. Trying to build through lsp-java fails because of the errors it is seeing.
I've tried the following in trying to resolve this:
- Tried using OpenJDK 11, 15 and 17
- I made sure that the JAVA_HOME path and the /usr/bin/java symlink are pointing to the same version of the JDK (I tried this with the three version of the JDK I have installed on my system)
- Made sure I deleted the ~/.emacs.d/workspace directory when changing the JDK configuration to ensure I'm working off a fresh configuration
I'm not sure what else to try. I'm hoping to get some guidance on what else I can try. I'm confused why I'm not seeing these errors in VS Code which as far as I know, they use the same backend - I'm using the Red Hat extension which also uses Eclipse JDT.
Has anyone else come across something like this before? Thanks for any help!