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

How to reference local libraries?

Open mustaqimM opened this issue 5 years ago • 4 comments
trafficstars

Hi there, how do I reference local jar libraries in non-maven/gradle/spring project like with the setting in vscode: java.project.referencedLibraries

I've been looking for it something similar but can't find it

mustaqimM avatar May 14 '20 13:05 mustaqimM

there is call lsp-register-custom-settings - probably we havent exposed the property.

yyoncho avatar May 14 '20 14:05 yyoncho

I see in vscode, simply putting the libraries in a lib folder allows it to resolve errors

mustaqimM avatar May 14 '20 14:05 mustaqimM

Actually it does add the libraries to the classpath. I was having trouble making it import the libs so I closed emacs and renamed the project and then it was able to add the lib folder to the class path. Please close this if you wish

And thank you for this and dap-mode!

mustaqimM avatar May 20 '20 12:05 mustaqimM

Yep, for me it worked after I moved the jar into a lib folder and ran lsp-restart-workspace.

x-ji avatar Aug 10 '20 21:08 x-ji