Thanx Gonzalo I will try that. On Wed, Jan 18, 2012 at 2:07 PM, gonzalo diethelm <[email protected]> wrote:
> Make sure you don’t have old versions of the DLL and JAR files lying > around. Then, put your DLL file in the System32 directory, put your JAR > file in the same directory where your main program is, adjust CLASSPATH > accordingly and try running your program. If it works, you can start slowly > unwinding this setup until you have everywhere placed wherever you want to. > **** > > ** ** > > HTH and best regards.**** > > ** ** > > -- **** > > Gonzalo Diethelm**** > > DCV Chile**** > > ** ** > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Glenn LeMoine > *Sent:* Wednesday, January 18, 2012 2:52 PM > *To:* [email protected] > *Subject:* [zeromq-dev] Fwd: FW: Java Binding**** > > ** ** > > ** ** > > ** ** > > Guys, > > I've successfully downloaded and compiled libzmq.dll as well as jzmq.dll > in VS2008 on Windows XP 32bit. I've xcopied the libraries as well as the > jars to C:\zmq\bin and C:\zmq\java respectively. I've added > java.library.path=.;C:\zmq\java to my system variables. I've added > ;C:\zmq\java to my classpath and I've added C:\zmq\bin to my Path. After > several iterations on the command line, it seems that the zmq.jar cannot > locate jzmq.dll as i get the following exception: > > C:\Devel\zmq\zeromq-jzmq-4bdf011\perf>java local_lat tcp://127.0.0.1:55551 100 > Exception in thread "main" java.lang.NoClassDefFoundError: org/zeromq/ZMQ > at local_lat.main(local_lat.java:36) > Caused by: java.lang.ClassNotFoundException: org.zeromq.ZMQ > at java.net.URLClassLoader$1.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > > I then tried copying the .dlls (libzmq,jzmq) into the C:\Windows\System32 > directory as well as to the C:\Devel\zmq\zeromq-jzmq-4bdf011\perf directory > to no avail. On the latest attempt I opened up the project in eclipse and > added the .dll as a native library. On this iteration, the zmq.jar > successfully found the jzmq.dll as evidenced by successfully creating a > context: > > > ZMQ.Context ctx = ZMQ.context (1); > ZMQ.Socket s = ctx.socket (ZMQ.REP); > > // Add your socket options here. > // For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for > PGM. > s.bind (bindTo); > > Unfortunately, the thread dies when it reaches > for (int i = 0; i != roundtripCount; i++) { > byte [] data = s.recv (0); > > on ZMQ.context.recieve with no exception. > > I'd appreciate help with the following two problems **** > > 1) Correctly declaring system and environment variables to run jzmq from > the command line. > 2) Diagnosing why the thread is dying when it reaches s.recv(0) (I haven't > looked as of yet, but my hunch is that s.recv calls into libzmq.dll and i > currently have it configured incorrectly.**** > > Many Thanks > > G**** > > ** ** > > ------------------------------ > 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. 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. > > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
