extracted jar file can not find main class

54 Views Asked by At

Could not find or load main class org.eclipse.vorto.example.mapping.HonoPayloadApp

in the HonoPayloadApp project, I extracted the jar file, but when running the jar file, it reports cannot find the main class, the extracted actions are ensured to be correct.

java -cp hono-payloadmapping.jar org.eclipse.vorto.example.mapping.HonoPayloa dApp start Error: Could not find or load main class org.eclipse.vorto.example.mapping.HonoPayloadApp

Is there any restriction of the vorto codes, because as I see the jar file in winrar, it seems a little abnormal.

1

There are 1 best solutions below

0
On

Please make sure you firstly build the project with maven successfully with mvn clean package and then run it with java -jar target/xyz.jar