I'm developing an OpenJPA application (no webserver, regular java se app). In order to make OpenJPA work with my application, I need to set the openjpa-all-2.3.0.jar as a javaagent.
java -cp ... -javaagent:/full/path/to/openjpa-all-2.3.0.jar -jar app.jar
As I am packaging the openjpa.jar within the app.jar anyway, I am now wondering how it is possible to specify the javaagent, as a jar within my application jar file.
This didn't work
java -cp ".;.\app.jar" -javaagent:openjpa-all-2.3.0.jar pckg.Main