Run example after maven package

I try to run some example like SimpleExample from examples after compiling jsprit with mvn package and run java -cp jsprit-examples-1.7.3-SNAPSHOT.jar com.graphhopper.jsprit.examples.SimpleExample

but after that i have problem like that:

java -cp jsprit-examples-1.7.3-SNAPSHOT.jar com.graphhopper.jsprit.examples.SimpleExample
java.lang.NoClassDefFoundError: com/graphhopper/jsprit/core/problem/vehicle/VehicleType
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetMethodRecursive(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.graphhopper.jsprit.core.problem.vehicle.VehicleType
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
… 7 more
Error: A JNI error has occurred, please check your installation and try again
Exception in thread “main”

Please Help

1 Like

Hi, were you able to solve this problem?

The same thing is happening to me.

Hi Burno, were you able to solve this problem?

The same thing is happening to me.

Hi @Rishabh
Yes, the solution of this problem is here:

1 Like

Thank you @brunogayet!

Powered by Discourse