0
$\begingroup$

Rosanswers logo

Hi, I created my own new package and took the Talker and Listener code from pubsub tutorial pkg.I build it using "gradle build" command I get error for both Talker and Listener: my_workspace/test_java_core/src/main/java/org/ros/test_java_core/Listener.java:28: GraphName(java.lang.String) has private access in org.ros.namespace.GraphName return new GraphName("test_java_core/listener"); I took listener and talker from pubsub tutorial. how to fix it? Thanks,


Originally posted by safzam on ROS Answers with karma: 111 on 2012-10-30

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The "Getting Started" page is a little outdated on that point. Instead of:

return new GraphName("rosjava_tutorial_pubsub/listener");

you should use:

return GraphName.of("rosjava_tutorial_pubsub/listener");

The rosjava_tutorial_pubsub package already has these changes.


Originally posted by Martin Günther with karma: 11816 on 2012-10-30

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by safzam on 2012-10-31:
it builds but it does not creat ".classpath",".project" files and ".settings/"directory as in pubsub pkg. Because I cannot run it I execute "./build/install/test_java_core/bin/test_java_core org.ros.test_java_core.Talker" get error:"./build/install/test_java_core/bin/test_java_core: Data not found"

Comment by Martin Günther on 2012-10-31:
add

apply plugin: 'eclipse'

to your build.gradle, run gradle eclipse.

Comment by safzam on 2012-10-31:
It builds and now the files are also made but it gives the same which I mentioned above when I apply command "./build/install/test_java_core/bin/test_java_core org.ros.test_java". Do I need to add something in baschrc? I dont know why it cannot find /build/install/test_java_core/bin/test_java_core.

Comment by safzam on 2012-11-02:
Hi Martin, Could you please answer my query http://answers.ros.org/question/47312/do-i-need-to-add-jar-path-in-buildgradle/ Thank you very much

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.