I am working on a simple java program, it uses a jason.jar and junit.*.jar (for testing). I usually run the tests through the command line; i never run my programs through and Editor/IDE, I always use the system environment. And while I am able to compile, test, and run the program, I keep getting errors with the lsp saying that modules related to my external .jar's are not found. I think this is because the lsp I am using eclipse.jdt.ls which cannot find the .jars inside my CLASSPATH variable and therefore throws errors. Is there a way to make the lsp errors/warnings go Away? i.e make emacs use the same CLASSPATH as my system

1 Answer 1


So, after some research and fighting some typos, I resorted to using the build.gradle script.

repositories {

dependencies {
    implementation files('dependencies/dependencyOne.jar')
    implementation files('dependencies/dependencyTwo.jar')
    implementation files('dependencies/dependencyThree.jar')    

Now, someone can perhaps contribute and explain how to add this globally in some sort of init file in either .emacs.d or init.el

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.