[ros-users] rosjava external jars
Nicholas Butko
nbutko at ucsd.edu
Tue Jul 6 23:40:23 UTC 2010
Can you send me the CMakeLists.txt and manifest.xml file for both packages? Or just cut and paste. It's probably not useful to send it to the whole list at this point, so you can just reply to me specifically.
You can try changing your Talker package CMakeLists.txt code to the following, and see if it helps to debug what is going on:
rosbuild_find_ros_package(externalLibs)
message("Found externalLibs at ${externalLibs_PACKAGE_PATH}"
add_classpath(${externalLibs_PACKAGE_PATH}/jar)
message("Java build classpath is ${_java_classpath}");
add_runtime_classpath(${externalLibs_PACKAGE_PATH}/jar)
message("Java runtime classpath is ${_java_runtime_classpath}");
add_jar_dir(${externalLibs_PACKAGE_PATH}/jar)
message("Java build classpath is ${_java_classpath}");
message("Java runtime classpath is ${_java_runtime_classpath}");
add_jni_path(${externalLibs_PACKAGE_PATH}/jar)
message("Java JNI path is ${_jniexe_path}")
Also, I tend to prefer "make" to "rosmake" because rosmake tends to suppress output that can be useful in debugging.
On Jul 6, 2010, at 4:18 PM, Jeremy Wright wrote:
> Nicholas,
>
> Thanks for the reply. This doesn't seem to be working for me, perhaps you can tell me what I'm doing wrong.
>
> I'm trying to get this working with the rosjava tutorials you sent to us here at the UofA. I created an externalLibs package like the one you described, with a jar directory. It contains one jar (jfreechart-1.0.13.jar). I added your cmake code below to CMakeLists.txt and I added one line to Talker.java:
>
> import org.jfree.*;
>
> However make still gives the error:
>
> Talker.java:3: package org.jfree does not exist
> import org.jfree.*;
> ^
> 1 error
>
> It seems like it's not finding the jar?
>
> Thank you for your help,
>
> Jeremy
>
> On Fri, Jul 2, 2010 at 4:03 PM, Nicholas Butko <nbutko at ucsd.edu> wrote:
> That must be outdated. I added some cmake code to rosjava to support this.
>
> Here is an example from cmake code that links to my "externalLibs" package, which simply consists of a "jar" directory, containing a bunch of .jar files and a .jnilib file:
>
> rosbuild_find_ros_package(externalLibs)
> add_classpath(${externalLibs_PACKAGE_PATH}/jar)
> add_runtime_classpath(${externalLibs_PACKAGE_PATH}/jar)
> add_jar_dir(${externalLibs_PACKAGE_PATH}/jar)
> add_jni_path(${externalLibs_PACKAGE_PATH}/jar)
>
>
>
>
> On Jul 2, 2010, at 3:53 PM, Jeremy Wright wrote:
>
> > The rosjava page says there isn't currently a way to use external jars, but has anyone experimented with this (successfully)? Does anyone know how I would get started?
> >
> > Jeremy Wright
> > ------------------------------------------------------------------------------
> > This SF.net email is sponsored by Sprint
> > What will you do first with EVO, the first 4G phone?
> > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first_______________________________________________
> > ros-users mailing list
> > ros-users at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/ros-users
> > _______________________________________________
> > ros-users mailing list
> > ros-users at code.ros.org
> > https://code.ros.org/mailman/listinfo/ros-users
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20100706/66b02b5f/attachment-0003.html>
More information about the ros-users
mailing list