[zeromq-dev] java.lang.UnsatisfiedLinkError: no jzmq in java.library.path
gonzalo diethelm
gdiethelm at dcv.cl
Wed Aug 1 13:42:52 CEST 2012
You need TWO shared libraries in order to work with jzmq: one for 0MQ proper and one for jzmq. They should be called libzmq.so and jzmq.so or something similar. The point is, BOTH of them are required.
Then you need the jzmq JAR (zmq.jar) reachable at the time you run your java command. This would be take care of byt the -cp argument you are using.
You probably are missing putting jzmq.so in /usr/local/lib. Can you check?
Good luck,
--
Gonzalo Diethelm
DCV Chile
From: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of John Cerwin
Sent: Tuesday, July 31, 2012 5:52 PM
To: zeromq-dev at lists.zeromq.org
Subject: [zeromq-dev] java.lang.UnsatisfiedLinkError: no jzmq in java.library.path
Hi,
I am running Fedora 17 with ZMQ 2.2. It works fine under C, but I get the following error in Java when I execute the following command:
java -Djava.library.path=/usr/local/lib -cp /home/john/jzmq/src/zmq.jar:. local_lat tcp://127.0.0.1:5000 1 100
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jzmq in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
at java.lang.Runtime.loadLibrary0(Runtime.java:845)
at java.lang.System.loadLibrary(System.java:1084)
at org.zeromq.ZMQ.<clinit>(ZMQ.java:34)
at local_lat.main(local_lat.java:36)
Here is what I have done so far:
1) Built zqm and jzmq on the same box (Fedora 17).
2) Followed the instructions here for Fedora: http://www.zeromq.org/bindings:java (***EXCEPT*** I am using zmq stable release 2.2 and NOT 2.1.10.)
3) Verified that libzmq is in /usr/local/lib, and that my java.library.path includes /usr/local/lib.
4) Verfied that the classpath includes zmq.jar.
5) Attempted to run it from both Eclipse and the shell with the same resulting error.
It appears that the native library cannot be found.... but could it be the incorrect version of zmq (2.2 vs 2.1.10)?
Any help would be greatly appreciated!
-----------------------------------------
Declaración de confidencialidad: Este Mensaje esta destinado para
el uso de la o las personas o entidades a quien ha sido dirigido y
puede contener información reservada y confidencial que no puede
ser divulgada, difundida, ni aprovechada en forma alguna. El uso no
autorizado de la información contenida en este correo podrá ser
sancionado de conformidad con la ley chilena.
Si usted ha recibido este correo electrónico por error, le pedimos
eliminarlo junto con los archivos adjuntos y avisar inmediatamente
al remitente, respondiendo este mensaje.
"Before printing this e-mail think if is really necesary".
Disclosure: This Message is to be used by the individual,
individuals or entities that it is addressed to and may include
private and confidential information that may not be disclosed,
made public nor used in any way at all. Unauthorized use of the
information in this electronic mail message may be subject to the
penalties set forth by Chilean law.
If you have received this electronic mail message in error, we ask
you to destroy the message and its attached file(s) and to
immediately notify the sender by answering this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120801/bf1f5381/attachment.htm>
More information about the zeromq-dev
mailing list