0

I am finishing a project that I have to deploy as a jar file, in eclipse it works fine, my project depends on two libraries which also both depends on dll files. I have added the path to these dlls to the native library location of each one of the external jars. Then I export project as a jar file using the eclipse runnable jar file export wizard I get the jar file in the specified location, it runs but when I click on a button that calls one of the libraries I get I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path on the console.

Edit : When I copy the dlls in [...]/jre7/bin/ folder my application works, but I want that my application runs without having to do this manipulation.

Regards.

user3382344
  • 177
  • 1
  • 1
  • 8

1 Answers1

0

Run like this: java -Djava.library.path=/path_to_dll -jar app.jar

Andrés Oviedo
  • 1,388
  • 1
  • 13
  • 28
  • Thank you for the answer, it did work but the problem is that I want the users to start the app normally without having to use a terminal. That means that the path should be added to the application before exporting to .jar, which I am unable to do. I found another solution to put the dlls inside [...]/jre7/bin/ but that also needs manipulations from the end users. – user3382344 Oct 25 '14 at 19:13