I want to run my working Java project through my terminal (mac). It uses Maven to pull in required dependencies. Any help would be very much appreciated.
First I ran the commend:
mvn clean install
Next:
mvn dependency:copy-dependencies
Finally:
cd target/
java -cp MyProject-1.0-SNAPSHOT.jar:dependency Main
Unfortunately the following error is thrown (clearly showing the dependencies are not being used correctly):
Exception in thread "main" java.lang.NoClassDefFoundError: org/json/simple/parser/JSONParser
at Main$Quote.quoteMachine(Hi.java:21)
at Main.main(Hi.java:12)
Caused by: java.lang.ClassNotFoundException: org.json.simple.parser.JSONParser
...