Difference between revisions of "Subagent:Java"
Jump to navigation
Jump to search
Tomas Kirnak (talk | contribs) (Created page with "The Java SubAgent needs to be compiled with the agent, using specific ./configure parameters.<br> Installed Java JDK is required.<br> <br> Example: <pre> ./configure --prefix=...") |
m (Text replacement - "^" to "{{deprecated}}") |
||
Line 1: | Line 1: | ||
The Java SubAgent needs to be compiled with the agent, using specific ./configure parameters.<br> | {{deprecated}}The Java SubAgent needs to be compiled with the agent, using specific ./configure parameters.<br> | ||
Installed Java JDK is required.<br> | Installed Java JDK is required.<br> | ||
<br> | <br> |
Latest revision as of 18:13, 13 September 2022
This Wiki is deprecated and we are are currrently migrating remaining pages into product documentation (Admin Guide, NXSL Guide) |
The Java SubAgent needs to be compiled with the agent, using specific ./configure parameters.
Installed Java JDK is required.
Example:
./configure --prefix=/usr --with-agent --with-jdk=/usr/lib/jvm/java-7-openjdk-amd64 make make install
You can check if the java SubAgent was installed using:
ls -l /usr/lib/netxms/ | grep java
You will need to properly setup the agent config file:
vim /etc/nxagentd.conf
At the end of the agent config file you need to add:
[JAVA] jvm = /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/libjvm.so ClassPath = ..path/netxms-agent-2.0-M5.jar
jvm parameter needs to point to libjvm.so, the location may be different on your system.
You can add multiple ClassPath parameters, including multiple .jar's
ClassPath = ..path/netxms-agent-2.0-M5.jar:/path/to/jar/app.jar:/path/another.jar
You can then specify multiple Plugin parameters which expose your Java classes to the NetXMS agent using:
Plugin = com.company.class Plugin = com.project.class2