---
title: "Configure the Java environment"
description: ""
url: "https://docs.itrsgroup.com/docs/geneos/7.11.0/collection/netprobe/configuration/configure-the-java-environment/index.html"
---
## Overview

Java-based components require a Java virtual environment (JVM) to run. This includes the following components and plugins:

- Control-M plugin
- E4JMS (TIBCO EMS) plugin
- IBM i plugins
- JMX plugin
- Publisher plugin
- REST API plugin
- REST Extractor plugin
- SSO Agent
- Uptrends plugin

This topic walks you through the files and setup required before you start configuring Java-based components.

## Required files

Before you begin, check that you have the complete set of Netprobe files on the machine where you are running the Java-based plugin.

These files are bundled in the Netprobe binary package, which you can download from [ITRS Downloads](https://resources.itrsgroup.com/downloads).

In addition, check that you have one of the supported Java Runtimes or Java Development Kits on the machine. These packages are available from their respective vendor sites.


**Note**

  
The supported Java version may be different, depending on the plugin you plan to run. For guidance on supported versions, see [Application and plugin specific information in Geneos Compatibility Matrix](https://docs.itrsgroup.com/docs/all/geneos/7x-geneos-compat-matrix/index.html).



For Windows platforms, the supported Java installation typically does not require the additional configuration steps outlined in this topic. Please proceed only when you encounter errors with your Java-based plugin.

Certain plugins require additional vendor-specific files to run. You must obtain these from a licensed distribution, as  does not make these files available as part of the Netprobe for this reason. In these cases, refer to the plugin user guide for the required vendor-specific files.

## Java virtual machine parameters

The Netprobe launches the Java virtual machine (JVM) with the following parameters:

<div class="table-container">
<table class="legacy-table" style="width: 100%; mc-table-style: url('../../../Resources/TableStyles/ref_2_col_table.css'); margin-left: 0; margin-right: auto;" class="TableStyle-ref_2_col_table" cellspacing="0">
                    <col class="TableStyle-ref_2_col_table-Column-Column1"/>
                    <col class="TableStyle-ref_2_col_table-Column-Column1"/>
                    <thead>
                        <tr class="TableStyle-ref_2_col_table-Head-Header1">
                            <th class="TableStyle-ref_2_col_table-HeadE-Column1-Header1">Parameter</th>
                            <th class="TableStyle-ref_2_col_table-HeadD-Column1-Header1">Description</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr class="TableStyle-ref_2_col_table-Body-Body1">
                            <td class="TableStyle-ref_2_col_table-BodyE-Column1-Body1"><code> java.class.path</code>
                            </td>
                            <td class="TableStyle-ref_2_col_table-BodyD-Column1-Body1">This parameter contains a list of third-party and user-defined
 classes that the JVM needs for running Java
 applications. The Netprobe uses all the JAR files
 found in the current directory, as well as the on the <code>GENEOS_JARS</code>
 environment variable. </td>
                        </tr>
                        <tr class="TableStyle-ref_2_col_table-Body-Body1">
                            <td class="TableStyle-ref_2_col_table-BodyE-Column1-Body1"><code>java.library.path</code>
                            </td>
                            <td class="TableStyle-ref_2_col_table-BodyD-Column1-Body1">
                                <p>This parameter provides the path to the native libraries that the JVM requires.</p>
                                <p>Typically, the
<code> java.library.path</code> is set to the location of the <code>launchpad</code> library file, and the current working directory.
When <code>JAVA_HOME</code> is defined and the Java library is found, their locations are also included in the <code> java.library.path</code>.</p>
                            </td>
                        </tr>
                        <tr class="TableStyle-ref_2_col_table-Body-Body1">
                            <td class="TableStyle-ref_2_col_table-BodyB-Column1-Body1"><code>java.home</code>
                            </td>
                            <td class="TableStyle-ref_2_col_table-BodyA-Column1-Body1">This parameter sets the Java home of the embedded JVM.</td>
                        </tr>
                    </tbody>
                </table>
                
</div>

Once the Netprobe starts, you can find and verify the values of the parameters in the Netprobe log.

### Disabling TLS or ciphers

To manually disable older TLS versions or other weak ciphers for Java applications, add the cipher you want to disable to the `jdk.tls.disabledAlgorithms` property of the `java.security` file. For example, adding `TLSv1`, `TLSv1.1`, and `CBC` to the list disables the TLSv1 and TLSv1.1 protocols, and the CBC ciphers.

```

 #Example:
  jdk.tls.disabledAlgorithms=TLSv1, TLSv1.1, CBC
```

The location of the `java.security` file is as follows:

- For Java 8, it is located in `<Java location>/lib/security`.  
- For Java11, it is located in `<Java location>/conf/security`.


For more information on TLS ciphers, see [TLS ciphers in Secure Communications](https://docs.itrsgroup.com/docs/geneos/7.11.0/security/secure-communications/ssl_ug/index.html#tls-ciphers).

## Configure the Java home

Java home as used by the Netprobe is set following this configuration precedence:

1. Commandline option — You are provided with a commandline option to specify the JRE to be used by the Netprobe. This will only be loaded when a Java plugin is configured. See [Netprobe Command-line Options](https://docs.itrsgroup.com/docs/geneos/7.11.0/collection/netprobe/configuration/netprobe-command-line-options/index.html).
2. `JAVA_HOME` environment variable — Geneos components use the `JAVA_HOME` environment variable (not `JRE_HOME`) to point to the Java runtime installation directory. For guidance on how to specify `JAVA_HOME` per platform, see [Set the environment variables](https://docs.itrsgroup.com/docs/geneos/7.11.0/collection/netprobe/configuration/configure-the-java-environment/index.html).
3. Java executable — On Windows, the Netprobe will attempt to locate Java home using the Java executable configured in the `PATH` environment variable.

    On Linux, the Netprobe will attempt to locate Java home using the default Java executable configured or symbolic-linked to `/etc/alternatives/java`. Otherwise, it will locate using the Java executable configured in the `PATH` environment variable.

    This is not applicable to the IBM AIX operating system.
4. Default Java installation directories — The Netprobe will recursively locate a usable JRE to be used in the default Java installation directories. On Windows, the directory is `C:\Program Files\Java\`. On Linux, it is `/etc/alternatives`.

    This is not applicable to the IBM AIX operating system.


**Note**


- Starting with Geneos 7.0.0, Netprobe requires Java 11 as the minimum supported Java version. However, Java 8 remains supported for Geneos versions 6.9.0 and earlier. For guidance, see [Java support](https://docs.itrsgroup.com/docs/all/geneos/7x-geneos-compat-matrix/index.html#java-support).
- Java home set by either using the Java executable or the default Java location will only be used by the Netprobe internally and won't affect any environment variables.



## Set the environment variables

Once the required files are in place, the next step is to set the environment variables so that the Netprobe can locate them.


**Note**

  Beginning Netprobes version 4.12.0, you only need to set the `JAVA_HOME` environment variable. From the information carried by that variable, the Netprobe can look for other JAR and library files on its own. For more information on this behaviour, see [Locating resource files for Netprobe versions 4.12.x](#locating-resource-files-for-netprobe-versions-412x). 


### Locating resource files for Netprobe versions 4.12.x

Beginning Netprobes version 4.12.0, the Netprobe attempts to locate JAR and library files based on the directory set in `JAVA_HOME`:

With this behaviour in place, the following environment variables become optional:

- `LD_LIBRARY_PATH`
- `PATH`
- `GENEOS_JARS`
- `GENEOS_LIBS`

Instead, the Netprobe searches for the JAR and library files in the following manner:

- The JAR files are searched for in the `/jars` directory in the Netprobe binary directory.
- `launchpad.dll` (for Windows) or `launchpad.so` (for Linux and similar platforms) are searched for in the Netprobe binary directory.
- `jvm.dll` (for Windows) or `libjvm.so` (for Linux and similar platforms) are searched for based on the value of `JAVA_HOME`.

**Caution**

  The 4.12.x Netprobe follows the OracleJDK and OpenJDK 8 structure when searching for `jvm.dll` or `libjvm.so`. If you are running OpenJDK 11, then you need to set the corresponding environment variable. 
The 5.10.x Netprobe searches for `jvm.dll` or `libjvm.so` on the directory set as `JAVA_HOME`. For AIX platforms only, `LIBPATH` needs to be set to the location of the native shared libraries.



If the Netprobe fails to locate the files in this method, then it attempts to search the files using the optional environment variables.


**Note**

  If you are running a plugin that requires vendor-specific JAR files, set `GENEOS_JARS` to point to the directory containing them. For guidance, see [For the JAR files](#jarfiles). 



### Java library

The Netprobe needs to create a Java virtual machine from which to load and run Java-based plugins or processes. To do so, it must locate the requisite library file found in the Java runtime installation directory:

- `libjvm.so` for Linux and similar platforms
- `jvm.dll` for Windows

To direct the Netprobe to the library file, modify the environment variable accordingly:

- `LD_LIBRARY_PATH` for Solaris and Linux platforms.
- `LIBPATH` for AIX platforms.
- `PATH` for Windows platforms.

When modifying the path environment variable, follow these guidelines:

- The path environment variable entry must come before any other entry.
- Do not copy the library file directly into the current working directory. The library file relies on relative paths to locate additional resources. If it is moved to the current
 working directory, then the additional resources will no longer be available, and the Netprobe will fail to create a Java virtual machine.

#### On Windows

##### Via command line

You can set the environment variable on the command line:

```
set JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_211\jre
set PATH=%JAVA_HOME%\bin\client;%PATH%
```

##### Via registry

Alternatively, to prevent conflicts with other Java applications, you can set the Netprobe registry keys, instead. The path to the Netprobe registry is 
`HKEY_LOCAL_MACHINE\SOFTWARE\NetAgent\NetprobeNT`
.

The `JAVA_HOME` and `JVM_LIBPATH` keys should be added in the same location as the other Netprobe registry keys:

- `JAVA_HOME` — points to the Java runtime folder. For example, `C:\Program Files (x86)\Java\jdk1.8.0_211\jre`.
- `JVM_LIBPATH` — contains the absolute path of the `jvm.dll` file. For example, `C:\Program Files (x86)\Java\jdk1.8.0_211\jre\bin\client\jvm.dll`.

![Windows registry keys for Java resources](https://docscdn.itrsgroup.com/geneos/images/netprobe/windows-java-registry-keys.png)


**Note**

  
If you set the registry keys, then the Netprobe ignores the values set in the environment.



#### On Solaris

You can set the environment variables on the command line:

```
setenv JAVA_HOME /usr/java/jdk1.8.0_211/jre
setenv LD_LIBRARY_PATH $JAVA_HOME/lib/sparc/client
setenv PATH $JAVA_HOME/bin:$PATH
```

#### On Linux

You can set the environment variables on the command line:

```
setenv JAVA_HOME /usr/java/jdk1.8.0_211/jre
setenv LD_LIBRARY_PATH $JAVA_HOME/lib/amd64/server
setenv PATH $JAVA_HOME/bin:$PATH
```

#### On IBM AIX

You can set the environment variables on the command line:

```
setenv JAVA_HOME /usr/java8/jre
setenv LIBPATH $JAVA_HOME/lib/ppc:$JAVA_HOME/lib/ppc/j9vm
setenv PATH $JAVA_HOME/bin:$PATH
```

### JAR files

You can specify the directory where the Netprobe accesses the Geneos JAR files through the `GENEOS_JARS` environment variable.

If a plugin requires vendor-specific JAR files, then use `GENEOS_JARS` to point to that directory, as well.

#### On Windows

On Windows platforms, you can set the environment variable on the command line:

```
set GENEOS_JARS=C:\Jars
```

#### On Linux, Solaris, and IBM AIX

On Linux and similar platforms, you can set the environment variable on the command line:

```
setenv GENEOS_JARS /jars

```


**Note**

  This setting is particularly useful when a plugin is expected to connect to an application and needs multiple JAR files to be able to connect to it, as it is not always feasible to copy additional JAR files into the current working directory.



### Additional directories to shared libraries

To specify additional directories for locating libraries used by the plugin, use the `GENEOS_LIBS` environment variable.

#### On Windows

You can set the environment variable on the command line:

```
set GENEOS_LIBS=C:\Libs
```

#### On Linux, Solaris, and IBM AIX

On Linux and similar platforms, you can set the environment variable on the command line:

```
setenv GENEOS_LIBS /libs
```

After you set the environment variables, restart the Netprobe.

## Next steps

After you have configured the Java environment, you may proceed to setting up your Java-based plugin:

- [Control-M](https://docs.itrsgroup.com/docs/geneos/7.11.0/collection/control-m-9-0-18/index.html)
- [Tibco E4JMS](https://docs.itrsgroup.com/docs/geneos/7.11.0/collection/e4jms/index.html)
- [IBM i AS/400](https://docs.itrsgroup.com/docs/geneos/7.11.0/collection/ibmi/index.html)
- [JMX](https://docs.itrsgroup.com/docs/geneos/7.11.0/collection/jmx-server/index.html)
- [REST API](https://docs.itrsgroup.com/docs/geneos/7.11.0/collection/rest-api/index.html)
- [REST Extractor](https://docs.itrsgroup.com/docs/geneos/7.11.0/collection/rest-extractor/index.html)


If you encounter errors when configuring your Java environment, see [Troubleshoot the Java configuration](https://docs.itrsgroup.com/docs/geneos/7.11.0/collection/troubleshooting/troubleshoot-the-java-configuration/index.html).


