Defining alternative JREs for Java extensions
To configure an alternative JRE
You can configure the alternative JRE in one of the following ways:
- Where supported and required (it is required when the technology being monitored requires a specific JRE for compatibility), set the technology specific JAVA_HOME environment variable in the users environment:
- See the table below for extensions that support technology specific JAVA_HOME environment variables.
- For example, set QPWLMON_JAVA_HOME to define a JRE specifically for Oracle Web Logic server monitoring.
- Set JAVA_HOME in the users environment to take precedence over the default JRE location. This is typical for Unix extensions that do not use a wrapper configuration file.
- Edit a launch script and wrapper configuration file to set the java path explicitly. This is typical for Windows extensions that use the wrapper file.
Current Java extensions
The following table shows all of the Java extensions in the current version of TrueSight Middleware and Transaction Monitor (TMTM).
Name | Monitored technology | JAVA_HOME override | Configuration files |
---|---|---|---|
bmmtm_agent | TMTM Configuration Agent | No. Uses bootstrap or OS provided JRE. | (Unix) bin/agent, bin/wrapper.conf (Windows) bin/agent.bat, bin/wrapper.conf |
bmmpa_datapower | IBM DataPower | No. Uses bootstrap JRE. | (Unix) bin/datapower.bat, bin/wrapper.conf (Windows) bin/datapower.bat, bin/wrapper.conf |
qphttp | IBM HTTP Server | JAVA_HOME on Unix | (Windows) qphttp.bat, qphttp.conf |
qptibrv | TIBCO RV | QPTIBRV_JAVA_HOME or JAVA_HOME on Unix | (Windows) qptibrv.bat, qptibrv.conf |
qptibems | TIBCO EMS | QPTIBEMS_JAVA_HOME or JAVA_HOME on Unix | (Windows) qptibems.bat, qptibems.conf |
qpwlmon | Oracle Web Logic | QPWLMON_JAVA_HOME or JAVA_HOME on Unix | (Windows) qpwlmon.bat, qpwlmon.conf |
qpmainview | MainView for MQ | JAVA_HOME on Unix | (Windows) qpmainview.bat, qpmainview.conf |
qpwmb | IBM WMB/IIB | N/A (uses MQSI profile) | N/A |
qpwasmon | IBM WebSphere Application Server | N/A (uses WAS_HOME) | N/A |
agentpref | TMTM Agent Preferences | JAVA_HOME on Unix | (Windows) agentpref.bat |
qntibems | TIBCO EMS (BTM) | QNTIBEMS_JAVA_HOME or JAVA_HOME on Unix | (Windows) qntibems.bat, qntibems.conf |
btmjeesvc | Java EE Application Servers (BTM) | JAVA_HOME on Unix | (Windows) btmjeesvc.bat, btmjeesvc.conf |
Editing extension configuration files
Each extension that requires a configuration file has both a launch script and .conf file in which the location of the JRE must be modified.
Using qptibems for example, the qptibems.bat defines the JRE location, as shown below.
rem Java command location
rem Change this to use an alternative JRE
rem Also change the definition of wrapper.java.command in qptibems.conf to use an alternative JRE
rem
:checkjava
set EXT_JAVA_EXE="%_REALPATH%..\jre\windows-x86-64\jre8\bin\java.exe"
The qptibems.conf file defines the location in the wrapper.java.command variable, as shown below.
# Java commmand location
# Change this to use an alternative JRE
# Also change the definition of _JAVA_EXE in qptibems.bat to use an alternative JRE
#
wrapper.java.command=../jre/windows-x86-64/jre8/bin/java
Both qptibems.bat and qptibems.conf must be changed to use a relative or absolute path to the preferred JRE.
For example, change the definition of _JAVA_EXE in qptibems.bat, as shown below.
rem Java command location
rem Change this to use an alternative JRE
rem Also change the definition of wrapper.java.command in qptibems.conf to use an alternative JRE
rem
:checkjava
set _JAVA_EXE="\path\to\some\other\jre\bin\java.exe"
Continuing with our example, modify the definition of in qptibems.conf, as shown below.
# Java commmand location
# Change this to use an alternative JRE
# Also change the definition of _JAVA_EXE in qptibems.bat to use an alternative JRE
#
wrapper.java.command=/path/to/some/other/jre/bin/java