[rosjava] Error using rosrun
I am trying to learn how to use rosjava. I am following the official tutorial, however in the second part Creating and Running Talker-Listener I am having some trouble.
When I run:
rosrun rosjava_catkin_package_a my_pub_sub_tutorial com.github.rosjava.rosjava_catkin_package_a.my_pub_sub_tutorial.Talker
I get the following error:
Loading node class: com.github.rosjava.rosjava_catkin_package_a.my_pub_sub_tutorial.Talker
Exception in thread "main" org.ros.exception.RosRuntimeException: Unable to locate node: com.github.rosjava.rosjava_catkin_package_a.my_pub_sub_tutorial.Talker
at org.ros.RosRun.main(RosRun.java:56)
Caused by: java.lang.ClassNotFoundException: com.github.rosjava.rosjava_catkin_package_a.my_pub_sub_tutorial.Talker
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.ros.internal.loader.CommandLineLoader.loadClass(CommandLineLoader.java:239)
at org.ros.RosRun.main(RosRun.java:54)
Also, is it necessary to use catkin_create_rosjava_project my_pub_sub_tutorial
? Is it possible to run programs the same way it is done with python? Like just creating a file.py and adding permissions to run?
Ps: I have very little knowledge about java.