title: Running Java project through command line (with Maven dependencies)
body: <p>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.</p>
  
  <p>First I ran the commend: 
  <code>mvn clean install</code></p>
  
  <p>Next:
  <code>mvn dependency:copy-dependencies</code></p>
  
  <p>Finally:
  <code>cd target/
  java -cp MyProject-1.0-SNAPSHOT.jar:dependency Main</code></p>
  
  <p>Unfortunately the following error is thrown (clearly showing the dependencies are not being used correctly):</p>
  
  <p><code>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</code> ...</p>