Use an external library in rosjava
I wrote a node (rosjava) that uses the library "lejos". Node compile without error, but when I run the node
rosrun rosjava_bootstrap run.py nxt_rosjava org.ros.nxt_rosjava.Listener
I get an error
Buildfile: /home/alex/lego-nxt-car-like/nxt_rosjava/dependencies.xml
get-dependencies:
BUILD SUCCESSFUL
Total time: 3 seconds
Executing command: ['java', '-classpath', u'/home/alex/lego-nxt-car-like/nxt_rosjava/target/org.ros.rosjava.nxt_rosjava-0.0.0.jar:/home/alex/.ros/rosjava/lib/org.ros.rosjava.test_ros-0.0.0.jar:/home/alex/.ros/rosjava/lib/org.ros.rosjava.roscpp-0.0.0.jar:/home/alex/.ros/rosjava/lib/org.ros.rosjava.topic_tools-0.0.0.jar:/opt/ros/diamondback/stacks/rosjava_core/apache_xmlrpc/target/org.ros.rosjava.apache-xmlrpc-3.1.3.jar:/opt/ros/diamondback/stacks/rosjava_core/rosjava_bootstrap/target/org.ros.rosjava.rosjava_bootstrap-0.0.0.jar:/home/alex/.ros/rosjava/lib/org.ros.rosjava.std_msgs-0.0.0.jar:/opt/ros/diamondback/stacks/rosjava_core/rosjava/target/org.ros.rosjava-0.0.0.jar:/home/alex/.ros/rosjava/lib/org.ros.rosjava.rosgraph_msgs-0.0.0.jar:/home/alex/.ros/rosjava/lib/org.ros.rosjava.geometry_msgs-0.0.0.jar:/opt/ros/diamondback/stacks/rosjava_core/apache_commons_util/target/org.ros.rosjava.ws-commons-util-1.0.2.jar:/home/alex/.m2/repository/com/google/guava/org.ros.rosjava.guava/r07/org.ros.rosjava.guava-r07.jar:/home/alex/.m2/repository/dnsjava/org.ros.rosjava.dnsjava/2.1.1/org.ros.rosjava.dnsjava-2.1.1.jar:/home/alex/.m2/repository/org/apache/commons/com.springsource.org.apache.commons.codec/1.3.0/com.springsource.org.apache.commons.codec-1.3.0.jar:/home/alex/.m2/repository/org/apache/commons/com.springsource.org.apache.commons.httpclient/3.1.0/com.springsource.org.apache.commons.httpclient-3.1.0.jar:/home/alex/.m2/repository/org/apache/commons/com.springsource.org.apache.commons.logging/1.1.1/com.springsource.org.apache.commons.logging-1.1.1.jar:/home/alex/.m2/repository/org/jboss/netty/netty/3.2.4.Final/netty-3.2.4.Final.jar', 'org.ros.RosRun', 'org.ros.nxt_rosjava.Listener']
Loading node class: org.ros.nxt_rosjava.Listener
Exception in thread "main" java.lang.NoClassDefFoundError: lejos/nxt/Motor
at org.ros.nxt_rosjava.Listener.main(Listener.java:36)
at org.ros.RosRun.main(RosRun.java:71)
I think that I need add "/home/alex/lejos_nxj/lib/pc/pccomm.jar" in dependencies.xml, but how to do it?