ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Using the comments by Lorenz,

I checked some steps:

I reinstalled stack for rosjava:

sudo aptitude reinstall ros-diamondback-client-rosjava

and I removed variables in the procedure to test:

LD_LIBRARY_PATH="$LD_LIBRARY_PATH":/opt/ros/diamondback/stacks/client_rosjava/rosjava/bin

export LD_LIBRARY_PATH
export LD_PRELOAD=/usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib/i386

I found rosjava in rospack:

jabrena@almaFactory:~$ rospack find test_rosjava
/opt/ros/diamondback/stacks/client_rosjava/test_rosjava

But the result is the same:

jabrena@almaFactory:~$ rosrun test_rosjava AddTwoIntsServer
Exception in thread "main" java.lang.NoClassDefFoundError: AddTwoIntsServer
Caused by: java.lang.ClassNotFoundException: AddTwoIntsServer
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: AddTwoIntsServer.  Program will exit.

In my opinion is something related with Classpath. Maybe.

Cheers