For
WebSphere® MQ Version 6.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 you can run the postcard application. If you use setjmsenv to set
your environment variables you need to set your PATH to use a 32-bit JVM as
described in Setting the PATH variable.
You can choose to
use this script in a variety of ways:
- You 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, you can run setjmsenv in every
session from which JMS startup scripts are to be run. If you choose this option
you need to run the setjmsenv script in every shell
window you start, during
the JMS verification process by typing:
. ./setjmsenv
For further information about using Java with
WebSphere MQ,
see the
Using Java book.