The latest version of WebSphere MQ Java is installed with WebSphere MQ. You might need to override default installation options to make sure this is done.
Refer to the following books for more information about installing WebSphere(R) MQ:
WebSphere MQ base Java is contained in the Java archive (JAR) file com.ibm.mq.jar.
WebSphere MQ JMS is contained in the JAR file com.ibm.mqjms.jar.
The following JAR files are also supplied with WebSphere MQ Java. These files are required by a WebSphere MQ JMS application that connects directly to a publish/subscribe broker.
The following Java(TM) libraries from Sun Microsystems are distributed with WebSphere MQ Java:
The sample application called Postcard is in postcard.jar. For more information about this application; see JMS Postcard.
The Javadoc tool has been used to generate the HTML pages containing the specifications of the WebSphere MQ base Java and WebSphere MQ JMS APIs. This documentation is in mqjmsapi.jar.
When installation is complete, files and samples are installed in the locations shown in Installation directories.
After installation, on any platform other than Windows, you must update your environment variables as described in Environment variables.
Table 2 shows where the WebSphere MQ Java files are installed on each platform.
Platform | Directory |
---|---|
AIX(R) | /usr/mqm/java |
HP-UX, Linux, and Solaris | /opt/mqm/java |
i5/OS | /QIBM/ProdData/mqm/java |
Windows | install_dir\Java |
z/OS | install_dir/mqm/V6R0M0/java |
Note:
install_dir is the directory in which you installed WebSphere MQ. On Windows, this directory is normally C:\Program Files\IBM\WebSphere MQ. On z/OS, this directory is likely to be /usr/lpp. |
Some sample applications, such as the Installation Verification Programs (IVPs), are supplied with WebSphere MQ. Table 3 shows where the sample applications are installed on each platform. The WebSphere MQ base Java samples are in a subdirectory called base, and the WebSphere MQ JMS samples are in a subdirectory called jms.
Platform | Directory |
---|---|
AIX | /usr/mqm/samp/java |
HP-UX, Linux, and Solaris | /opt/mqm/samp/java |
i5/OS | /QIBM/ProdData/mqm/java/samples |
Windows | install_dir\Tools\Java |
z/OS | install_dir/mqm/V6R0M0/java/samples |
Note:
install_dir is the directory in which you installed WebSphere MQ. On Windows, this directory is normally C:\Program Files\IBM\WebSphere MQ. On z/OS, this directory is likely to be /usr/lpp. |
Before you can run WebSphere MQ Java applications, the setting for your CLASSPATH environment variable must include the appropriate WebSphere MQ Java code. To run the sample applications, the CLASSPATH setting must also include the appropriate samples directories.
To run WebSphere MQ base Java applications, including the WebSphere MQ base Java sample applications, use the CLASSPATH setting for your platform as shown in Table 4.
Platform | CLASSPATH setting |
---|---|
AIX |
CLASSPATH=/usr/mqm/java/lib/com.ibm.mq.jar: /usr/mqm/samp/java/base: |
HP-UX, Linux, and Solaris |
CLASSPATH=/opt/mqm/java/lib/com.ibm.mq.jar: /opt/mqm/samp/java/base: |
i5/OS |
CLASSPATH=/QIBM/ProdData/mqm/java/lib/com.ibm.mq.jar: /QIBM/ProdData/mqm/java/samples/base: |
Windows |
CLASSPATH=install_dir\Java\lib\com.ibm.mq.jar; install_dir\Tools\Java\base; |
z/OS |
CLASSPATH=install_dir/mqm/V6R0M0/java/lib/com.ibm.mq.jar: install_dir/mqm/V6R0M0/java/samples/base: |
Note:
install_dir is the directory in which you installed WebSphere MQ. On Windows, this directory
is normally C:\Program Files\IBM\WebSphere MQ. On z/OS, this directory is likely
to be /usr/lpp. |
To run WebSphere MQ JMS applications, including the WebSphere MQ JMS sample applications, use the CLASSPATH setting for your platform as shown in Table 5.
Platform | CLASSPATH setting |
---|---|
AIX |
CLASSPATH=/usr/mqm/java/lib/com.ibm.mqjms.jar: /usr/mqm/samp/java/jms: |
HP-UX, Linux, and Solaris |
CLASSPATH=/opt/mqm/java/lib/com.ibm.mqjms.jar: /opt/mqm/samp/java/jms: |
i5/OS |
CLASSPATH=/QIBM/ProdData/mqm/java/lib/com.ibm.mqjms.jar: /QIBM/ProdData/mqm/java/samples/jms: |
Windows |
CLASSPATH=install_dir\Java\lib\com.ibm.mqjms.jar; install_dir\Tools\Java\jms; |
z/OS |
CLASSPATH=install_dir/mqm/V6R0M0/java/lib/com.ibm.mqjms.jar: install_dir/mqm/V6R0M0/java/samples/jms: |
Note:
install_dir is the directory in which you installed WebSphere MQ. On Windows, this directory
is normally C:\Program Files\IBM\WebSphere MQ. On z/OS, this directory is likely
to be /usr/lpp. |
To run WebSphere MQ base Java and WebSphere MQ JMS applications, including the WebSphere MQ base Java and WebSphere MQ JMS sample applications, simply combine the CLASSPATH settings shown in Table 4 and Table 5.
The scripts provided with WebSphere MQ Java use the following environment variables:
On Windows, all the environment variables are set automatically during installation. On any other platform, you must set them yourself. On a UNIX system, you can use the script setjmsenv to set the environment variables. On AIX, setjmsenv is in the /usr/mqm/java/bin directory and, on HP-UX, Linux, and Solaris, it is in the /opt/mqm/java/bin directory.
On i5/OS, the environment variable QIBM_MULTI_THREADED must be set to Y. You can then run multithreaded applications in the same way that you run single threaded applications.
To specify the location of the WebSphere MQ Java libraries, start your application using a java command with the following format:
java -Djava.library.path=library_path application_name
where library_path is the path to the WebSphere MQ Java libraries. Table 6 shows the location of the WebSphere MQ Java libraries for each platform.
Platform | Directory containing the WebSphere MQ Java libraries |
---|---|
AIX |
/usr/mqm/java/lib (32-bit libraries) /usr/mqm/java/lib64 (64-bit libraries) |
HP-UX Linux (POWER platform) Solaris |
/opt/mqm/java/lib (32-bit libraries) /opt/mqm/java/lib64 (64-bit libraries) |
Linux (x86 platform) Linux (zSeries platform) |
/opt/mqm/java/lib |
Windows | install_dir\Java\lib |
z/OS | install_dir/mqm/V6R0M0/java/lib |
Note:
install_dir is the directory in which you installed WebSphere MQ. On Windows, this directory
is normally C:\Program Files\IBM\WebSphere MQ. On z/OS, this directory is likely
to be /usr/lpp. |
On z/OS, the STEPLIB used at runtime must contain the WebSphere MQ SCSQAUTH library. From UNIX System Services, you can add this using a line in your .profile as shown below, replacing thlqual with the high level data set qualifier that you chose when installing WebSphere MQ:
export STEPLIB=thlqual.SCSQAUTH:$STEPLIB
In other environments, you typically need to edit the startup JCL to include SCSQAUTH on the STEPLIB concatenation:
STEPLIB DD DSN=thlqual.SCSQAUTH,DISP=SHR
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
csqzaw1316 |