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 /opt/mqm/java/bin. The environment variables that setjmsenv sets are as follows:

CLASSPATH
/opt/mqm/java/lib/com.ibm.mq.jar:
/opt/mqm/java/lib/com.ibm.mqjms.jar:
/opt/mqm/samp/java/base:
/opt/mqm/samp/java/jms:
MQ_JAVA_INSTALL_PATH
/opt/mqm/java
MQ_JAVA_DATA_PATH
/var/mqm
MQ_JAVA_LIB_PATH
/opt/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:

For further information about using Java with WebSphere MQ, see the WebSphere MQ 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


lq10570_