I am working on a Java project set up with Maven. I have set up my pom to include all dependencies and create a jar with dependencies using the appropriate maven plugin. The RTI nddsjava library has been loaded onto my maven repository server, but for some reason, when I try to load classes in nddsjava (such as com.rti.dds.domain.DomainParticipant). Any suggestions on how I can create a jar with all dependencies completely self-contained that runs?
Asked
Active
Viewed 2,395 times
1 Answers
3
Are you running into problems during runtime or packaging? Your statement above is the symptoms of the problem that you're running into.
The Java binding for RTI Connext relies on 3 native libraries. So, if you're running into runtime issues, then you'll need to package these libraries as part of your deliverable. Also, these libraries will need to be made available on the dynamic library loading path (PATH on Windows, LD_LIBRARY_PATH on *nix, DYLD_LIBRARY_PATH on Mac OS X).

Ken Brophy
- 46
- 1
-
I ran into problems during runtime. So I did finally get my program running by putting the ndds libraries on LD_LIBRARY_PATH in Ubuntu, as you suggested. Is there a way to avoid having to do that? Or would you end up having to load the system libraries in Java? – jfoo Jun 10 '14 at 18:13
-
2Our Java library needs to load the native libraries, correct. So this is the most practical way to solve the problem for now. Are you using OSGi or some other container? We've been considering making an OSGi package which could address this issue by making a single .jar file which has native libraries for all supported platforms embedded within it. Is that something that would help your situation? – Ken Brophy Jun 11 '14 at 14:10