Set environment variables using setjmsenv
Before performing this task ensure you have removed any hardcoded links to the Java™ libraries as described in Set the PATH variable.
For WebSphere MQ V6.0 Java scripts to function properly a number of environment variables must be set. The setjmsenv script can be used to set these variables, and is located in /usr/mqm/java/bin. The environment variables that setjmsenv sets are as follows:
CLASSPATH /usr/mqm/java/lib/com.ibm.mq.jar: /usr/mqm/java/lib/com.ibm.mqjms.jar: /usr/mqm/samp/java/base: /usr/mqm/samp/java/jms:MQ_JAVA_INSTALL_PATH /usr/mqm/javaMQ_JAVA_DATA_PATH /var/mqmMQ_JAVA_LIB_PATH /usr/mqm/java/lib (32-bit libraries)Use either the 32-bit libraries or the 64-bit libraries. Use the 64-bit libraries only if you are running your application in a 64-bit Java virtual machine (JVM) on a 64-bit platform. Otherwise, use the 32-bit libraries.
The setjmsenv script sets MQ_JAVA_LIB_PATH to the location of the 32-bit libraries so that we can run the postcard application. If you use setjmsenv to set your environment variables we need to set your PATH to use a 32-bit JVM as described in Set the PATH variable.
We can choose to use this script in a variety of ways:
- We can use the setjmsenv script as a basis for setting the required environment variables, as shown in the table, or add them to the .profile using a text editor. If you have a non-typical setup, edit the script contents as necessary.
- Alternatively, we can run setjmsenv in every session from which JMS startup scripts are to be run. If you choose this option we need to run the setjmsenv script in every shell window you start, during the JMS verification process by typing:
. ./setjmsenvFor further information about using Java with WebSphere MQ, see the Using Java book.
When you have configured your system you are able to verify that WebSphere MQ V6.0 has installed correctly as described in Verifying your installation.
Parent topic:
Set up your system to run the JMS postcard
aq10480_