I managed to build my own rosnode with the new gradle build system. But when I run my node with the command ./build/scripts/mynode org.ros.mynode I get the following error
Exception in thread "main" java.lang.NoClassDefFoundError: org/ros/RosRun
Caused by: java.lang.ClassNotFoundException: org.ros.RosRun
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
The same happens if I try to run the pub_sub tutorial with the command
./build/scripts/rosjava_tutorial_pubsub org.ros.rosjava_tutorial_pubsub.Talker
After having a look at the generated script, it just sets the classpath to
CLASSPATH=$APP_HOME/lib/rosjava_tutorial_pubsub-0.0.0-SNAPSHOT.jar:$....
It seems that the class path is not set correctly, because APP_HOME points to pwd -P and there is no lib folder. What am I doing wrong in the execution of the rosnodes?
Originally posted by Markus Eich on ROS Answers with karma: 202 on 2012-05-21
Post score: 0