Execute Java example after test and package with Maven
===

I am trying to run my first Java program, an example script that interacts with a online API ([source](https://github.com/nesstar/nesstar-api-demo) on Github).

As it has dependencies, I follow the recommended steps using `mvn test` and `mvn package`, which seem to work (see [output](http://pastie.org/4251039)).

I however do not understand how to run the program that I just compiled (or packaged?). The `.java` file contains `public final class NesstarStudyLister`, so based on the `pom.xml` file I try (in the base directory) the following command:


`mhermans@fyr:~/tmp/nesstar-api-demo$ java -cp target/nesstar_study_lister-1.0-SNAPSHOT.jar com.nesstar.demo.NesstarStudyLister`

Which [results](http://pastie.org/4251058) in a `NoClassDefFoundError`.

How can I successfully run the small Java-program?