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

GraphName() private access Error in rosjava_core

asked 2012-10-30 23:24:03 -0500

safzam gravatar image

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,

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2012-10-30 23:47:08 -0500

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.

edit flag offensive delete link more

Comments

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"

safzam gravatar image safzam  ( 2012-10-31 00:42:22 -0500 )edit

add

apply plugin: 'eclipse'

to your build.gradle, run gradle eclipse.

Martin Günther gravatar image Martin Günther  ( 2012-10-31 02:36:28 -0500 )edit

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.

safzam gravatar image safzam  ( 2012-10-31 03:04:40 -0500 )edit

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

safzam gravatar image safzam  ( 2012-11-02 23:13:47 -0500 )edit

Question Tools

Stats

Asked: 2012-10-30 23:24:03 -0500

Seen: 476 times

Last updated: Oct 30 '12