[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zeromq-dev
Subject:    Re: [zeromq-dev] Question on connecting a C++ model to a Java model via Python uzing ZeroMQ
From:       Sara Rimer <sara.p.rimer () gmail ! com>
Date:       2016-08-17 15:15:26
Message-ID: CAAO-M2vn-yCWfmv=0vWO2vCq=rr75hr26iZaUor0Z=4nVAsQSA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Stephen,

This has been a while since I last responded to this e-mail, but I am
having some issues again with utilizing ZeroMQ in the program I have
developed within Eclipse. So I got ZeroMQ to work in Eclipse using your
instructions and just creating a simple program where I had hwClient.java
as my only class. It works fine.

But now, I am trying to integrate it into my other program and I am having
some issues. I am calling ZeroMQ by basically making hwClient its own
method and these are the errors I am receiving:

Caused by: java.lang.ClassNotFoundException: org.zeromq.ZMQ
Caused by: java.lang.NoClassDefFoundError: org/zeromq/ZMQ

I have my ZeroMQ property and classpaths the same as when hwClient,java
works as a standalone program. Any thoughts?

Thank you.

-Sara

On Sat, Apr 30, 2016 at 12:42 AM, Stephen Riesenberg <
stephen.riesenberg@gmail.com> wrote:

> Glad to hear you've made progress.
>
> Have you yet read the ZeroMQ guide <http://zguide.zeromq.org/page:all>?
> There are numerous chapters that go into gory detail about how to build
> various types of communication patterns. For your use-case, a very basic
> usage should suffice I think, though you can add sophistication once you
> get a basic example working.
>
> I think you basically have a Server (REQ) and a Client (REP) program. By
> default, calls to recv messages are blocking, so that should solve your
> wait part, at least for example purposes. And REQ sockets will take turns
> sending to each client, roughly speaking. You would probably want to start
> by reading the first few chapters up to Chapter 3, possibly Chapter 4. At
> some point, you may graduate to a poller-based loop, but shouldn't need to
> get much more sophisticated.
>
> Let us know how it goes.
>
> On Fri, Apr 29, 2016 at 3:58 PM, Sara Rimer <sara.p.rimer@gmail.com>
> wrote:
>
>> This worked!!!! Thank you so much!!
>>
>> As a follow-up question, I was just curious if you might have a
>> recommendation to me for how I conceptually set up my ZeroMQ system. So I
>> basically want a server that I run that receives and sends messages to two
>> clients. Client1 waits for a message from the Server before it runs for a
>> given time, then sends a message to the Server once it has finished.
>> Client2 waits to receive a message from the Server that it sends once it
>> receives a message from Client1. Then once Client2 receives this message,
>> it runs for a given time and sends a message to the Server to then deploy
>> Client1. And this repeats.
>>
>> I think I am stuck as to how to do the "waiting" part for both of the
>> clients. Do you have any suggestions?
>>
>> I can't thank you enough for your help.
>>
>> On Fri, Apr 29, 2016 at 12:16 AM, Stephen Riesenberg <
>> stephen.riesenberg@gmail.com> wrote:
>>
>>> Looks like you're on the right path now. So -Djava.library.path is what
>>> allows the Java program to find the binary linked library for jzmq. For
>>> reference, -D is a flag that allows you to pass runtime environment
>>> parameters which are available via e.g. System.getProperty("java.
>>> library.path").
>>>
>>> So for Eclipse, you need two things.
>>>
>>>    1. Set up your program to run with that property (java.library.path)
>>>    set, which can be done per program (main) or globally.
>>>    2. Set up your classpath.
>>>
>>> I'm using STS, but should be the same.
>>>
>>> To set your library path for a program, go to Run -> Run Configurations
>>> -> Java Application -> [your program] -> Arguments tab. If you don't have
>>> any programs yet, just right-click your program with a main() and run
>>> it. It gets created automatically even if it has errors. In the Arguments
>>> tab, under VM arguments, add -Djava.library.path=/usr/local/lib.
>>>
>>> To set your classpath, I usually use Maven or Gradle, but if you're
>>> rolling your own custom project with no dependency management, you right
>>> click your project -> Properties -> Java Build Path -> Libraries tab, then
>>> add your jar(s).
>>>
>>> Hope that helps.
>>>
>>> Also, if you want to set up a Maven or Gradle based sample ZeroMQ Java
>>> project, let me know, and I can help with that. It would be a nice repo to
>>> have on GitHub for people like yourself to fork and start coding.
>>>
>>> On Thu, Apr 28, 2016 at 6:24 PM, Sara Rimer <sara.p.rimer@gmail.com>
>>> wrote:
>>>
>>>> Ok, so I ran the
>>>> mvn test
>>>> and it everything was okay. I was originally trying to rebuild some
>>>> basic ZeroMQ programs using Java just to make sure it worked (my preferred
>>>> language is Python). But while the programs would compile, they wouldn't
>>>> run. That is when I went back to looking for tutorials and came across one
>>>> that used local_lat as an example, which thanks to your advice I
>>>> abandoned trying it.
>>>>
>>>> Thus, I retried building hwClient.java and hwServer.java and I finally
>>>> got them to work! My issue was pointing to the correct classpaths (which I
>>>> am not quite used to doing in Java), and also adding in this (
>>>> -Djava.library.path=/usr/local/lib), but I don't really understand
>>>> what the "-Djava" command does).
>>>>
>>>> Anyway, I had to add the following paths so my command looked like this:
>>>>
>>>> java -cp ./:/usr/local/share/java/zmq.jar:/home/sara/Applications/
>>>> zeromq/jzmq/jzmq-jni/src/main/c++/zmq.jar -Djava.library.path=/usr/local/lib
>>>> hwClient
>>>>
>>>> The Java program that I have built that I am trying to implement ZeroMQ
>>>> with I have built within Eclipse. So I am not really used to working with
>>>> Java via the terminal. Thus, I was wondering how I can I run the command
>>>> above via Eclipse? That is, if you are familiar with Eclipse, how to I add
>>>> these classpaths?
>>>> -cp ./:/usr/local/share/java/zmq.jar:/home/sara/Applications/
>>>> zeromq/jzmq/jzmq-jni/src/main/c++/zmq.jar
>>>>
>>>> And then how do I implement the following command in Eclipse?
>>>> -Djava.library.path=/usr/local/lib hwClient
>>>>
>>>> ​Thank you all. I appreciate your help.
>>>>
>>>> Sincerely,
>>>> Sara​
>>>>
>>>>
>>>> On Wed, Apr 27, 2016 at 9:35 PM, Stephen Riesenberg <
>>>> stephen.riesenberg@gmail.com> wrote:
>>>>
>>>>> Sara,
>>>>>
>>>>> While I've done quite a bit of working with jzmq on my local machine,
>>>>> I've rarely run the local_lat program that's used as an example on the
>>>>> documentation page for the java binding. So, I may be off a bit, but I
>>>>> think you would need to build the C++ project in the
>>>>> jzmq/builds/msvc/local_lat to have that class available. Possibly at
>>>>> one time it was included in the jar, but that may have changed and it looks
>>>>> like it isn't any longer.
>>>>>
>>>>> Perhaps try running the following (assuming you have maven installed)
>>>>> in the local directory where you downloaded and built jzmq:
>>>>>
>>>>> mvn test
>>>>>
>>>>>
>>>>> Another option is the JeroMQ test suite, which includes several of the
>>>>> guide examples, which also requires you to download and set up the project
>>>>> locally (using maven). Or skip it and drop these classes into your own
>>>>> project (https://github.com/sjohnr/jeromq/blob/develop/src/test/
>>>>> java/guide/hwclient.java, https://github.com/sjohnr/jeromq/
>>>>> blob/develop/src/test/java/guide/hwserver.java).
>>>>>
>>>>> Or try running a minimal example of your own within your own project.
>>>>>
>>>>> Hope that helps.
>>>>>
>>>>> On Wed, Apr 27, 2016 at 7:55 PM, Sara Rimer <sara.p.rimer@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi everyone,
>>>>>>
>>>>>> I am finally getting back to this part of my project. So I think the
>>>>>> issue is that I just can't get ZeroMQ to work with Java on my machine. I
>>>>>> have tried JeroMQ as well. I have been following this guide:
>>>>>> http://zeromq.org/bindings:java and when I try
>>>>>>
>>>>>> $ java -cp /usr/local/share/java/zmq.jar:. local_lat tcp://127.0.0.1:5000 1 100
>>>>>>
>>>>>> I get this error
>>>>>>
>>>>>> Error: Could not find or load main class local_lat
>>>>>>
>>>>>> I think I have just not found a good guide for how to set up ZeroMQ
>>>>>> for Java on Linux 12.04. Any suggestions?
>>>>>>
>>>>>> Thank you.
>>>>>>
>>>>>> Sincerely,
>>>>>> Sara
>>>>>>
>>>>>> On Mon, Mar 28, 2016 at 8:30 PM, Stephen Riesenberg <
>>>>>> stephen.riesenberg@gmail.com> wrote:
>>>>>>
>>>>>>> Sara,
>>>>>>>
>>>>>>> How far have you gotten in your effort? Do you have an example
>>>>>>> class? What issues did you run into? What requirements do you have for your
>>>>>>> API? Is it files, or just data you are sending back and forth between these
>>>>>>> two environments?
>>>>>>>
>>>>>>> Sorry for so many questions, but I bet with a few details we can get
>>>>>>> you pointed in the right direction. Sounds like an interesting project!
>>>>>>>
>>>>>>> On Friday, March 25, 2016, Sara Rimer <sara.p.rimer@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> This is most likely a very basic usage of ZeroMQ, but I am a
>>>>>>>> computational engineer and I am trying to connect a hydraulic model written
>>>>>>>> in C++ to a decision tree model written in Java. I would like to send data
>>>>>>>> files back and forth between the two programs. I am using ZeroMQ for this.
>>>>>>>> And I have gotten ZeroMQ to work via Python no problem (which I am planning
>>>>>>>> on using for my C++ model which I run via a bash script). However, I am
>>>>>>>> having difficulty interfacing it with Java. I was planning on just creating
>>>>>>>> a class in Java that is solely used to interface with ZeroMQ. Does anyone
>>>>>>>> have any suggestions?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Sara
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> zeromq-dev mailing list
>>>>>>> zeromq-dev@lists.zeromq.org
>>>>>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sara Rimer
>>>>>> University of Michigan Graduate Student
>>>>>> Department of Civil and Environmental Engineering
>>>>>> srimer@umich.edu
>>>>>> sara.p.rimer@gmail.com
>>>>>> 269.483.6334
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> zeromq-dev mailing list
>>>>>> zeromq-dev@lists.zeromq.org
>>>>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> zeromq-dev mailing list
>>>>> zeromq-dev@lists.zeromq.org
>>>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Sara Rimer
>>>> University of Michigan Graduate Student
>>>> Department of Civil and Environmental Engineering
>>>> srimer@umich.edu
>>>> sara.p.rimer@gmail.com
>>>> 269.483.6334
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> zeromq-dev mailing list
>>>> zeromq-dev@lists.zeromq.org
>>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>>>
>>>
>>>
>>> _______________________________________________
>>> zeromq-dev mailing list
>>> zeromq-dev@lists.zeromq.org
>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>>
>>
>>
>>
>> --
>> Sara Rimer
>> University of Michigan Graduate Student
>> Department of Civil and Environmental Engineering
>> srimer@umich.edu
>> sara.p.rimer@gmail.com
>> 269.483.6334
>>
>>
>>
>>
>>
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>



-- 
Sara Rimer
University of Michigan Graduate Student
Department of Civil and Environmental Engineering
srimer@umich.edu
sara.p.rimer@gmail.com
269.483.6334

[Attachment #5 (text/html)]

<div dir="ltr"><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">Hi \
Stephen,<br><br></div><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">This has been a while \
since I last responded to this e-mail, but I am having some issues again with \
utilizing ZeroMQ in the program I have developed within Eclipse. So I got ZeroMQ to \
work in Eclipse using your instructions and just creating a simple program where I \
had hwClient.java as my only class. It works fine.<br><br></div><div \
class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">But now, I am trying \
to integrate it into my other program and I am having some issues. I am calling \
ZeroMQ by basically making hwClient its own method and these are the errors I am \
receiving:<br><br><span style="font-family:monospace,monospace">Caused by: \
java.lang.ClassNotFoundException: org.zeromq.ZMQ<br>Caused by: \
java.lang.NoClassDefFoundError: org/zeromq/ZMQ<br></span><br></div><div \
class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">I have my ZeroMQ \
property and classpaths the same as when hwClient,java works as a standalone program. \
Any thoughts?<br><br></div><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">Thank \
you.<br><br></div><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">-Sara<br></div></div><div \
class="gmail_extra"><br><div class="gmail_quote">On Sat, Apr 30, 2016 at 12:42 AM, \
Stephen Riesenberg <span dir="ltr">&lt;<a href="mailto:stephen.riesenberg@gmail.com" \
target="_blank">stephen.riesenberg@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Glad to hear you&#39;ve made \
progress.<div><br></div><div>Have you yet read the <a \
href="http://zguide.zeromq.org/page:all" target="_blank">ZeroMQ guide</a>? There are \
numerous chapters that go into gory detail about how to build various types of \
communication patterns. For your use-case, a very basic usage should suffice I think, \
though you can add sophistication once you get a basic example \
working.</div><div><br></div><div>I think you basically have a Server (REQ) and a \
Client (REP) program. By default, calls to <font face="monospace, \
monospace">recv</font> messages are blocking, so that should solve your wait part, at \
least for example purposes. And REQ sockets will take turns sending to each client, \
roughly speaking. You would probably want to start by reading the first few chapters \
up to Chapter 3, possibly Chapter 4. At some point, you may graduate to a \
poller-based loop, but shouldn&#39;t need to get much more \
sophisticated.</div><div><br></div><div>Let us know how it goes.</div></div><div \
class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div \
class="gmail_quote">On Fri, Apr 29, 2016 at 3:58 PM, Sara Rimer <span \
dir="ltr">&lt;<a href="mailto:sara.p.rimer@gmail.com" \
target="_blank">sara.p.rimer@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">This worked!!!! Thank \
you so much!!</div><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div \
class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">As a follow-up \
question, I was just curious if you might have a recommendation to me for how I \
conceptually set up my ZeroMQ system. So I basically want a server that I run that \
receives and sends messages to two clients. Client1 waits for a message from the \
Server before it runs for a given time, then sends a message to the Server once it \
has finished. Client2 waits to receive a message from the Server that it sends once \
it receives a message from Client1. Then once Client2 receives this message, it runs \
for a given time and sends a message to the Server to then deploy Client1. And this \
repeats.</div><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div \
class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">I think I am stuck as \
to how to do the &quot;waiting&quot; part for both of the clients. Do you have any \
suggestions?</div><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div \
class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">I can&#39;t thank you \
enough for your help.  </div></div><div><div><div class="gmail_extra"><br><div \
class="gmail_quote">On Fri, Apr 29, 2016 at 12:16 AM, Stephen Riesenberg <span \
dir="ltr">&lt;<a href="mailto:stephen.riesenberg@gmail.com" \
target="_blank">stephen.riesenberg@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Looks like you&#39;re on the right path now. \
So <font face="monospace, monospace">-Djava.library.path</font> is what allows the \
Java program to find the binary linked library for jzmq. For reference, -D is a flag \
that allows you to pass runtime environment parameters which are available via e.g.  \
<font face="monospace, \
monospace">System.getProperty(&quot;java.<wbr>library.path&quot;)</font>.<div><br></div><div>So \
for Eclipse, you need two things.</div><div><ol><li>Set up your program to run with \
that property (java.library.path) set, which can be done per program (main) or \
globally.</li><li>Set up your classpath.</li></ol><div>I&#39;m using STS, but should \
be the same.</div><div><br></div><div>To set your library path for a program, go to \
Run -&gt; Run Configurations -&gt; Java Application -&gt; [your program] -&gt; \
Arguments tab. If you don&#39;t have any programs yet, just right-click your program \
with a <font face="monospace, monospace">main()</font> and run it. It gets created \
automatically even if it has errors. In the Arguments tab, under VM arguments, add  \
<span style="font-family:monospace,monospace">-Djava.library.path=/usr/</span><span \
style="font-family:monospace,monospace">l<wbr>ocal/lib</span>.</div></div><div><br></div><div>To \
set your classpath, I usually use Maven or Gradle, but if you&#39;re rolling your own \
custom project with no dependency management, you right click your project -&gt; \
Properties -&gt; Java Build Path -&gt; Libraries tab, then add your \
jar(s).</div><div><br></div><div>Hope that helps.</div><div><br></div><div>Also, if \
you want to set up a Maven or Gradle based sample ZeroMQ Java project, let me know, \
and I can help with that. It would be a nice repo to have on GitHub for people like \
yourself to fork and start coding.</div></div><div><div><div \
class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 28, 2016 at 6:24 PM, \
Sara Rimer <span dir="ltr">&lt;<a href="mailto:sara.p.rimer@gmail.com" \
target="_blank">sara.p.rimer@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">Ok, so I ran the <font \
face="monospace, monospace"><br></font><div style="margin-left:40px"><font \
face="monospace, monospace">mvn test</font><br></div>and it everything was okay. I \
was originally trying to rebuild some basic ZeroMQ programs using Java just to make \
sure it worked (my preferred language is Python). But while the programs would \
compile, they wouldn&#39;t run. That is when I went back to looking for tutorials and \
came across one that used <span \
style="font-family:monospace,monospace">local_lat</span> as an example, which thanks \
to your advice I abandoned trying it.<br><br></div><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">Thus, I retried \
building hwClient.java and hwServer.java and I finally got them to work! My issue was \
pointing to the correct classpaths (which I am not quite used to doing in Java), and \
also adding in this (<font size="2"><span \
style="font-family:monospace,monospace">-Djava.library.path=/usr/<wbr>local/lib</span></font>), \
but I don&#39;t really understand what the &quot;-<span \
style="font-family:monospace,monospace">Djava</span>&quot; command does).   \
<br><br>Anyway, I had to add the following paths so my command looked like \
this:<br><br><div style="margin-left:40px"><span \
style="font-family:monospace,monospace">java -cp \
./:/usr/local/share/java/zmq.<wbr>jar:/home/sara/Applications/<wbr>zeromq/jzmq/jzmq-jni/src/main/<wbr>c++/zmq.jar \
-Djava.library.path=/usr/<wbr>local/lib hwClient</span><br></div><br></div><div \
class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">The Java program that \
I have built that I am trying to implement ZeroMQ with I have built within Eclipse. \
So I am not really used to working with Java via the terminal. Thus, I was wondering \
how I can I run the command above via Eclipse? That is, if you are familiar with \
Eclipse, how to I add these classpaths?<span style="font-family:monospace,monospace"> \
<br></span><div style="margin-left:40px"><span \
style="font-family:monospace,monospace">-cp \
./:/usr/local/share/java/zmq.<wbr>jar:/home/sara/Applications/<wbr>zeromq/jzmq/jzmq-jni/src/main/<wbr>c++/zmq.jar</span><br></div><br></div><div \
class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">And then how do I \
implement the following command in Eclipse?<br><div style="margin-left:40px"><span \
style="font-family:monospace,monospace"> -Djava.library.path=/usr/<wbr>local/lib \
hwClient<br></span></div></div><div class="gmail_extra"><br><div \
class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">​Thank you all. I \
appreciate your help.<br><br></div><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">Sincerely,<br></div><div \
class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;font-size:small">Sara​</div><div><div><br><br><div \
class="gmail_quote">On Wed, Apr 27, 2016 at 9:35 PM, Stephen Riesenberg <span \
dir="ltr">&lt;<a href="mailto:stephen.riesenberg@gmail.com" \
target="_blank">stephen.riesenberg@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div dir="ltr">Sara,<div><br></div><div>While \
I&#39;ve done quite a bit of working with jzmq on my local machine, I&#39;ve rarely \
run the local_lat program that&#39;s used as an example on the documentation page for \
the java binding. So, I may be off a bit, but I think you would need to build the C++ \
project in the <font face="monospace, monospace">jzmq/builds/msvc/local_lat</font> to \
have that class available. Possibly at one time it was included in the jar, but that \
may have changed and it looks like it isn&#39;t any \
longer.</div><div><br></div><div>Perhaps try running the following (assuming you have \
maven installed) in the local directory where you downloaded and built \
jzmq:</div><div><blockquote style="margin:0px 0px 0px 40px;border:medium \
none;padding:0px"><div><font face="monospace, monospace">mvn \
test</font></div></blockquote><div><br></div>Another option is the JeroMQ test suite, \
which includes several of the guide examples, which also requires you to download and \
set up the project locally (using maven). Or skip it and drop these classes into your \
own project (<a href="https://github.com/sjohnr/jeromq/blob/develop/src/test/java/guide/hwclient.java" \
target="_blank">https://github.com/sjohnr/<wbr>jeromq/blob/develop/src/test/<wbr>java/guide/hwclient.java</a>, \
<a href="https://github.com/sjohnr/jeromq/blob/develop/src/test/java/guide/hwserver.java" \
target="_blank">http<wbr>s://github.com/sjohnr/jeromq/<wbr>blob/develop/src/test/java/<wbr>guide/hwserver.java</a>).</div><div><br></div><div>Or \
try running a minimal example of your own within your own \
project.</div><div><br></div><div>Hope that helps.</div></div><div><div><div \
class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 27, 2016 at 7:55 PM, \
Sara Rimer <span dir="ltr">&lt;<a href="mailto:sara.p.rimer@gmail.com" \
target="_blank">sara.p.rimer@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div \
style="font-family:arial,helvetica,sans-serif;font-size:small">Hi everyone,</div><div \
style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div \
style="font-family:arial,helvetica,sans-serif"><span><div>I am finally getting back \
to this part of my project. So I think the issue is that I just can&#39;t get ZeroMQ \
to work with Java on my machine. I have tried JeroMQ as well. I have been following \
this guide:  <a href="http://zeromq.org/bindings:java" style="font-size:small" \
target="_blank">http://zeromq.org/<wbr>bindings:java</a>  and when I try  <br><div \
style="margin-left:40px"><pre style="white-space:pre-wrap"><font><code>$ java -cp \
/usr/local/share/java/zmq.jar:<wbr>. local_lat tcp://<a href="http://127.0.0.1:5000/" \
target="_blank">127.0.0.1:5000</a> 1 100</code></font></pre></div></div><div \
style="font-size:small">I get this error<br><br><div style="margin-left:40px"><span \
style="font-family:monospace,monospace">Error: Could not find or load main class \
local_lat</span><br></div><br></div></span><div style="font-size:small">I think I \
have just not found a good guide for how to set up ZeroMQ for Java on Linux 12.04. \
Any suggestions?<br><br></div><div style="font-size:small">Thank \
you.<br><br></div><div style="font-size:small">Sincerely,<br></div><div \
style="font-size:small">Sara</div></div></div><div class="gmail_extra"><br><div \
class="gmail_quote"><span>On Mon, Mar 28, 2016 at 8:30 PM, Stephen Riesenberg <span \
dir="ltr">&lt;<a href="mailto:stephen.riesenberg@gmail.com" \
target="_blank">stephen.riesenberg@gmail.com</a>&gt;</span> \
wrote:<br></span><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div><div>Sara,<div><br></div><div>How far have \
you gotten in your  effort? Do you have an example class? What issues did you run \
into? What requirements do you have for your API?  Is it files, or just data you are \
sending back and forth between these two environments?</div><div><br></div><div>Sorry \
for so many questions, but I bet with a few details we can get you pointed in the \
right direction. Sounds like an interesting project!</div><div><div><div><br>On \
Friday, March 25, 2016, Sara Rimer &lt;<a href="mailto:sara.p.rimer@gmail.com" \
target="_blank">sara.p.rimer@gmail.com</a>&gt; wrote:<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div \
</div>
</blockquote></div>
</div></div><br></div></div><span>______________________________<wbr>_________________<br>
 zeromq-dev mailing list<br>
<a href="mailto:zeromq-dev@lists.zeromq.org" \
target="_blank">zeromq-dev@lists.zeromq.org</a><br> <a \
href="http://lists.zeromq.org/mailman/listinfo/zeromq-dev" rel="noreferrer" \
target="_blank">http://lists.zeromq.org/<wbr>mailman/listinfo/zeromq-dev</a><br> \
<br></span></blockquote></div><span><br><br clear="all"><div><br></div>-- \
<br><div><div dir="ltr"><font size="4"><font face="garamond, serif">Sara \
Rimer<br>University of Michigan Graduate Student <br>Department of Civil and \
Environmental Engineering<br><a href="mailto:srimer@umich.edu" \
target="_blank">srimer@umich.edu</a><br><a href="mailto:sara.p.rimer@gmail.com" \
target="_blank">sara.p.rimer@gmail.com</a><br><a href="tel:269.483.6334" \
value="+12694836334" \
target="_blank">269.483.6334</a></font><br></font><br><br><br><br></div></div> \
</span></div> <br>______________________________<wbr>_________________<br>
zeromq-dev mailing list<br>
<a href="mailto:zeromq-dev@lists.zeromq.org" \
target="_blank">zeromq-dev@lists.zeromq.org</a><br> <a \
href="http://lists.zeromq.org/mailman/listinfo/zeromq-dev" rel="noreferrer" \
target="_blank">http://lists.zeromq.org/<wbr>mailman/listinfo/zeromq-dev</a><br></blockquote></div><br></div>
 </div></div><br>______________________________<wbr>_________________<br>
zeromq-dev mailing list<br>
<a href="mailto:zeromq-dev@lists.zeromq.org" \
target="_blank">zeromq-dev@lists.zeromq.org</a><br> <a \
href="http://lists.zeromq.org/mailman/listinfo/zeromq-dev" rel="noreferrer" \
target="_blank">http://lists.zeromq.org/<wbr>mailman/listinfo/zeromq-dev</a><br></blockquote></div><br><br \
clear="all"><br>-- <br><div><div dir="ltr"><font size="4"><font face="garamond, \
serif">Sara Rimer<br>University of Michigan Graduate Student <br>Department of Civil \
and Environmental Engineering<br><a href="mailto:srimer@umich.edu" \
target="_blank">srimer@umich.edu</a><br><a href="mailto:sara.p.rimer@gmail.com" \
target="_blank">sara.p.rimer@gmail.com</a><br><a href="tel:269.483.6334" \
value="+12694836334" \
target="_blank">269.483.6334</a></font><br></font><br><br><br><br></div></div> \
</div></div></div></div> <br>______________________________<wbr>_________________<br>
zeromq-dev mailing list<br>
<a href="mailto:zeromq-dev@lists.zeromq.org" \
target="_blank">zeromq-dev@lists.zeromq.org</a><br> <a \
href="http://lists.zeromq.org/mailman/listinfo/zeromq-dev" rel="noreferrer" \
target="_blank">http://lists.zeromq.org/<wbr>mailman/listinfo/zeromq-dev</a><br></blockquote></div><br></div>
 </div></div><br>______________________________<wbr>_________________<br>
zeromq-dev mailing list<br>
<a href="mailto:zeromq-dev@lists.zeromq.org" \
target="_blank">zeromq-dev@lists.zeromq.org</a><br> <a \
href="http://lists.zeromq.org/mailman/listinfo/zeromq-dev" rel="noreferrer" \
target="_blank">http://lists.zeromq.org/<wbr>mailman/listinfo/zeromq-dev</a><br></blockquote></div><br><br \
clear="all"><div><br></div>-- <br><div><div dir="ltr"><font size="4"><font \
face="garamond, serif">Sara Rimer<br>University of Michigan Graduate Student \
<br>Department of Civil and Environmental Engineering<br><a \
href="mailto:srimer@umich.edu" target="_blank">srimer@umich.edu</a><br><a \
href="mailto:sara.p.rimer@gmail.com" target="_blank">sara.p.rimer@gmail.com</a><br><a \
href="tel:269.483.6334" value="+12694836334" \
target="_blank">269.483.6334</a></font><br></font><br><br><br><br></div></div> </div>
</div></div><br>______________________________<wbr>_________________<br>
zeromq-dev mailing list<br>
<a href="mailto:zeromq-dev@lists.zeromq.org" \
target="_blank">zeromq-dev@lists.zeromq.org</a><br> <a \
href="http://lists.zeromq.org/mailman/listinfo/zeromq-dev" rel="noreferrer" \
target="_blank">http://lists.zeromq.org/<wbr>mailman/listinfo/zeromq-dev</a><br></blockquote></div><br></div>
 </div></div><br>______________________________<wbr>_________________<br>
zeromq-dev mailing list<br>
<a href="mailto:zeromq-dev@lists.zeromq.org">zeromq-dev@lists.zeromq.org</a><br>
<a href="http://lists.zeromq.org/mailman/listinfo/zeromq-dev" rel="noreferrer" \
target="_blank">http://lists.zeromq.org/<wbr>mailman/listinfo/zeromq-dev</a><br></blockquote></div><br><br \
clear="all"><br>-- <br><div class="gmail_signature" \
data-smartmail="gmail_signature"><div dir="ltr"><font size="4"><font face="garamond, \
serif">Sara Rimer<br>University of Michigan Graduate Student <br>Department of Civil \
and Environmental Engineering<br><a href="mailto:srimer@umich.edu" \
target="_blank">srimer@umich.edu</a><br><a href="mailto:sara.p.rimer@gmail.com" \
target="_blank">sara.p.rimer@gmail.com</a><br>269.483.6334</font><br></font><br><br><br><br></div></div>
 </div>


[Attachment #6 (text/plain)]

_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic