Ask Your Question

rosjava.jar missing certain packages

asked 2011-09-14 15:55:51 -0500

sskk89 gravatar image

updated 2011-09-15 06:34:03 -0500

kwc gravatar image

I got rosjava.jar from delbian packages, in the dist folder. But when I use this as a reference lib in eclipse, I realise certain packages like org.ros.node and are missing.

Can someone please explain how I could solve this problem?

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted

answered 2011-09-21 03:05:23 -0500

updated 2011-09-22 01:01:36 -0500 comes from the packages ( The other missing jars are most likely built when you build the rosjava package. The manifest.xml file of a package specifies dependencies and when you run "rosmake" on the package it will generate the jar files for each of those dependencies.

I recommend installing rosjava and from source. Here's (hopefully) a helpful guide:

1) Install ROS electric, unstable, or later

    a.  ‘sudo apt-get install ros-electric-desktop-full’ (for electric)

2) Clone the latest rosjava source from googlecode into a directory in your ROS_PACKAGE_PATH

    Install Mercurial (hg) : ‘sudo apt-get install hg’

    Go to and Follow “Command-line access” instructions

3) Run ‘rospack profile’ to update your environment

4) Build rosjava

    ‘rosmake rosjava’

Continue for Andorid setup

1) Install eclipse

    ‘sudo apt-get install eclipse’

2) Install the Andorid SDK

    Follow the instructions at

3) Clone the latest source from googlecode into a directory in your ROS_PACKAGE_PATH

    Go to and Follow “Command-line access” instructions

4) Run ‘rospack profile’ to update your environment

5) Build


From here you should have a working environment. To run the tutorials, run "rosmake" on the one you want, then import it into eclipse. If you're doing Android dev you may need to import android_gingerbread or android_honeycomb_mr2 into eclipse also, and add them as project references.

android_gingerbread and android_honeycomb_mr2 are the packages (eclipse projects) that provide

To create a new rosjava package you can follow the instructions here :

The only difference for android is that the build.xml file should be :

<?xml version="1.0" encoding="UTF-8"?>
  <property file=""/>
  <include file="${ros.pkg.rosjava_bootstrap.dir}/android.xml"/>

You'll also need to set up the right exports. Add this to your manifest.xml file:

  <rosjava-android-lib target="android-9" />
  <rosjava-src location="src" />
  <rosjava-src location="gen" />
  <rosjava-src location="res" />

After running rosmake you should be able to import your the package into eclipse and begin development.

edit flag offensive delete link more

answered 2011-09-15 01:55:51 -0500

DimitriProsser gravatar image

updated 2011-09-15 04:28:02 -0500

Have you tried using this tutorial?

You could also get the rosjava_core from source listed on the rosjava wiki.

edit flag offensive delete link more


yup. i tried building. it gives me errors. is it possible to just download the rosjava.jar file from somewhere else?
sskk89 gravatar image sskk89  ( 2011-09-15 04:23:18 -0500 )edit
i got my rosjava_core from debian packages
sskk89 gravatar image sskk89  ( 2011-09-15 16:08:25 -0500 )edit

answered 2012-02-28 20:55:57 -0500

vahid gravatar image

Hi, thanks for the tutorial on how to setup the tools, but currently I am trying to import up the android_tutorial_camera after doing rosmake on it and I wanted to know how do run it, because whenever I right click on the project name and "run->android application" I see the AVD fire up and try to run the tutorial but it tells me of an unexpected exception that could not run the tutorial and the only choice for me is to hit close. I wanted to know how should I exactly run this since this is my first time. I am not getting errors also in the source code. Thanks, Vahid.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-09-14 15:55:51 -0500

Seen: 2,236 times

Last updated: Feb 28 '12