Silk13 Silk13 - 1 month ago 13
Java Question

Program runs fine in Eclipse, but throws error when Jar is run on the command line

Compiled with

mvn package
, I then try to run the
with java
-jar app.jar
and it runs, but then throws a


The program runs completely fine in Eclipse.

How do I stop this from happening so I can run the program in the command line?


Looks like you are missing dependencies. Try putting this in your pom.xml:


And then run: java -jar [your-package-jar-with-dependencies.jar]