sublimelsp / LSP-jdtls

Convenience package for the Eclipse JDT language server
https://packagecontrol.io/packages/LSP-jdtls
MIT License
30 stars 4 forks source link

Creating lsp-jdtls in hand made projects? #34

Closed saharsadoghi closed 1 year ago

saharsadoghi commented 1 year ago

Hello. If I have a project which I create manually without the use of any build tools such as maven or gradle; for each file/java_class that I make lsp-jdtls tell me
warning balblahblah.java is not on the classpath of project thisandthat_b1d88d99, only syntax errors are reported. I see the mave projects that works out of the box have .classpath at the root of their projects. I want to know if there is a command to make that file base on what I have? Or how could I make that file myself? What is the convention - syntax - style for this file? Thanks for your help.

LDAP commented 1 year ago

Normally it should work out of the box.

Please doublecheck that the first folder in your sidebar (used as workspace folder by the LSP plugin) is the project root and that each Java file is in a subfolder matching its package.

That error often occurs when you open a Java file that is not part of the first sidebar folder.

saharsadoghi commented 1 year ago

I just create a blank directory and open it on to sublime. then start to create a directory structure I need, like: my_created_dir>>src >>io>>starter>>{model,view,base} Which I open my_created_dir on to sublime. then each of my . java files has io.starter.{model,view,base} package declaration at the top. I guess it is a wrong approach? thanks again 0/

LDAP commented 1 year ago

I can reproduce this. It seems that this is a bug in LSP-jdtls.

saharsadoghi commented 1 year ago

any solutions @LDAP ?