I am developing a desktop app with Datanucleus and JDO for embedded H2 database. It all works fine when I run it from Eclipse, but it stops working when I try to make execut
Adding to DataNucleus answer.
To acheave what you need you should use maven-dependency-plugin
and add following to your pom.xml
org.apache.maven.plugins
maven-dependency-plugin
2.4
copy-dependencies
package
copy-dependencies
${project.build.directory}/jars
false
false
true
Then the dependencies will be in target/jars dir.
To execute your app you use command:
Windows:
java -cp "yourFile.jar;jars/*" package.className
Linux:
java -cp "yourFile.jar:jars/*" package.className
NOTE: do not use jars/*.jar, this will not work