- Ensure you have ZEROMQ_HOME environment variable pointing to the root source package (and compiled jars/dlls). See the compilation guide for more info.
- Ensure %ZEROMQ_HOME%\java\lib\zeromq.jar is on the classpath. The best way to achieve this if you’re using Maven is to deploy it to your internal repository so your work colleague can reference it directly.
To deploy to internal maven repo:
C:\> cd %ZEROMQ_HOME%\java\lib C:\zeromq-4.0.5\java\lib> mvn deploy:deploy-file -Dfile=zmq.jar -DgroupId=my.company.zmq -DartifactId=zmq -Dversion=3.1.0 Durl=file:////path/to/my/company/maven_repository
To add this dependency on your project, add this to your pom.xml:
my.company.zmq zmq 3.1.0 my-company-internal file:////path/to/my/company/maven_repository - Set java system property java.library.path to %ZEROMQ_HOME%\java\lib. Note that java doesn’t accept environment variable, so you have to resolve it yourself. If you’re running through command line:
C:\> java -Djava.library.path=C:\zeromq-4.0.5\java\lib
On application servers like tomcat, you’ll have to edit the start script or the Windows service configuration. This system property has to be set before runtime starts, doing System.setProperty(key, value) will not work.
- Add %ZEROMQ_HOME%\bin\x64 to PATH env var:
C:\>SET PATH=%ZEROMQ_HOME%\bin\x64;%PATH%
If deploying on production server, this need to be done via Windows Advanced System Configuration. Make sure you restart any VM so it can pick up the latest env vars
- If you’re deploying on production environment, only following folder layout is required:
C:\zeromq-4.0.5 +- bin +- x64 +- libzmq.dll +- java +- lib +- jzmq.dll