The JNRPE library is the heart of the whole JNRPE package. It allows to embed inside your application the JNRPE so that you will be able to answer to check_nrpe queries.
If you need an example, feel free to use the sources of the JNRPE Server: it is built on top of this library.
The easiest way to compile an application using jnrpe-lib is through the use of maven.
If you don't want to use maven, you have to manually download the dependencies.
Create the following directory structure:
+- src/ +- main/ +- java/ +- pom.xml
and put your sources under the 'java' directory.
Create a file called pom.xml in the same directory as 'src'. This are the jnrpe-lib data:
Edit the pom.xml file according to the maven documentation and insert the following dependency:
<dependency> <groupId>net.sf.jnrpe</groupId> <artifactId>jnrpe-lib</artifactId> <version>2.0.4</version> </dependency>
as soon as your project is complete, you can run:
mvn compile package
If you don't use maven, than you are on your own and you will have to manually download jnrpe-lib and all its dependecies manually.
You can download jnrpe-lib and its dependencies (deps.tar.gz) here