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