2

I have a java application using an external dll (zmq). When I run it in debug mode in Eclipse it's all fine. However, when I export the application as Runnable JAR file then trying to run it, I'm getting that error referencing the dll. Following my research on this site I configured the build path for JRE System Library, added that path of the folder containing the dll to Native library location, but I'm still getting that error. Is there anything I need to do further? Or different? Thanks.

user3062233
  • 179
  • 1
  • 2
  • 7

1 Answers1

3

JZMQ needs two things to run: zmq.dll (the native ZMQ library) and jzmq.dll (the "bridge" library between Java and ZMQ). The particular error you are getting means your compile environment can't locate jzmq.dll; you just need to specify the path where it can find jzmq.dll. Note that, as far as I'm aware, there is no way for jzmq.dll to be in a JAR file so you can just include it in your classpath.

Unfortunately, I can't tell you exactly how to do it in Windows. I come from Linux, where DLLs are SO files. There it would be a simple export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/jzmq.

skytreader
  • 11,467
  • 7
  • 43
  • 61