0
$\begingroup$

Rosanswers logo

While trying to perform the java installation listed here: http://docs.rosjava.googlecode.com/hg/rosjava_core/html/building.html

I ran into the following issue:

:rosjava_messages:generateSources Exception in thread "main" java.lang.NullPointerException at org.ros.internal.message.GenerateInterfaces.main(GenerateInterfaces.java:162)

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':rosjava_messages:generateSources'.

Command '/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/bin/java' finished with (non-zero) exit value 1.

Here is line 162 (GenerateInterfaces.java:162):

160     String rosPackagePath = System.getenv(EnvironmentVariables.ROS_PACKAGE_PATH);
161     Collection<File> packagePath = Lists.newArrayList();
162     for (String path : rosPackagePath.split(File.pathSeparator)) {
163       File packageDirectory = new File(path);
164       if (packageDirectory.exists()) {
165         packagePath.add(packageDirectory);
166       }
167     }

Originally posted by Yeison Rodriguez on ROS Answers with karma: 103 on 2013-03-24

Post score: 0


Original comments

Comment by Yeison Rodriguez on 2013-03-25:
Part of the problem that I'm seeing here is that 'EnvironmentVariables.ROS_PACKAGE_PATH' is null. The environment variable is just not set at this point. I don't know where it is supposed to be set, or why it is not set, but I will investigate.

Comment by Yeison Rodriguez on 2013-03-25:
http://www.ros.org/wiki/ROS/EnvironmentVariables#ROS_PACKAGE_PATH

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

This issue is currently waiting to be patched:

https://code.google.com/p/rosjava/issues/detail?id=135&sort=-id

In the meantime, you may be able to get around the problem by setting the environment variable ROS_PACKAGE_PATH as defined here: http://www.ros.org/wiki/ROS/EnvironmentVariables#ROS_PACKAGE_PATH


Originally posted by Yeison Rodriguez with karma: 103 on 2013-03-25

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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