I'm building a self contained trading simulator using the quickfix/j library. Up untill now I'd been using mvn package, then the intelli J "Run button" to run my program from an entry point within my client-application class. I tried using the java -jar target/.....1.1.0.jar
. and get the following error
java -jar Broker/target/Broker-1.0.0.jar
Error: Could not find or load main class Broker.ClientApplication
Caused by: java.lang.NoClassDefFoundError: quickfix/Application
I thought the error might have something to do with my pom file not fetching a dependecy properly. So to make sure I ran the ordermatch example from the quickfix/J github, but i get a similar error.
java -jar /homes/antonga/IdeaProjects/Desktop/quickfixj-parent/quickfixj-examples/ordermatch/target/quickfixj-examples-ordermatch-2.1.1-sources.jar
no main manifest attribute, in /homes/antonga/IdeaProjects/Desktop/quickfixj-parent/quickfixj-examples/ordermatch/target/quickfixj-examples-ordermatch-2.1.1-sources.jar
To be clear using the Intellli J "Run" button inside the main calss works percfectly even for the ordermacth example. From what I gather the command IntelliJ uses is something like this
"/path/to/java/" "-javagent/.../.jar" "/pathtolocalmavenrepo/quickfix-core.jar "/pathtolocalmavenrepo/anotherquickfixdependecy.jar" ....."more quickfix dependency jar files" packagestructure.Main
I don't see why this would work but my execution wouldn't. I can include my pom files and other info if this would help. I'm also using a multi-module maven project but that doesn't seem to the problem.