What is installed for IBM MQ classes for JMS

A number of files and directories are created when you install IBM® MQ classes for JMS. On Windows, some configuration is performed during installation by automatically setting environment variables. On other platforms, and in certain Windows environments, you must set environment variables before you can run IBM MQ classes for JMS applications.

For most operating systems, the IBM MQ classes for JMS are installed as an optional component when you install IBM MQ.

For more information about installing IBM MQ, see:
Important:
  • Apart from the relocatable JAR files described in this topic, copying the IBM MQ classes for JMS JAR files or native libraries to other machines, or to a different location on a machine where the IBM MQ classes for JMS have been installed, is not supported.
  • In addition, including the com.ibm.mq.allclient.jar file, or the IBM MQ classes for JMS, within application archives (such as enterprise application archives, or EAR files), is not supported.

You should therefore avoid bundling IBM MQ jar files in your applications (EAR files on WebSphere® Application Server), otherwise you might encounter unexpected issues associated with running back-level, unpatched code.

Installation directories

Table 1 shows where the IBM MQ classes for JMS files are installed on each platform.

Table 1. IBM MQ classes for JMS installation directories
Platform Directory
[AIX]UNIX and Linux® MQ_INSTALLATION_PATH/java
[Windows]Windows MQ_INSTALLATION_PATH\java
[IBM i]IBM i /QIBM/ProdData/mqm/java
[z/OS]z/OS MQ_INSTALLATION_PATH/mqm/V9R0M0/java
MQ_INSTALLATION_PATH/opt/mqm/java

MQ_INSTALLATION_PATH represents the high-level directory in which IBM MQ is installed.

The installation directory includes the following content:
  • The IBM MQ classes for JMS JAR files, which are in the MQ_INSTALLATION_PATH\java\lib directory.
  • The IBM MQ native libraries, which are used by applications that use the Java Native Interface.

    The 32-bit native libraries are installed into the MQ_INSTALLATION_PATH\java\lib directory and the 64-bit native libraries can be found in the MQ_INSTALLATION_PATH\java\lib64 directory.

    For more information about the IBM MQ native libraries, see Configuring the Java Native Interface (JNI) libraries.

  • Additional scripts that are described in Scripts provided with IBM MQ classes for JMS. These scripts are in the MQ_INSTALLATION_PATH\java\bin directory.
  • The specifications of the IBM MQ classes for JMS API. The Javadoc tool has been used to generate the HTML pages that contain the specifications of the API.
    The HTML pages are in the MQ_INSTALLATION_PATH\java\doc\WMQJMSClasses directory:
    • [UNIX, Linux, Windows]On UNIX, Linux, and Windows, this subdirectory contains the individual HTML pages.
    • [IBM i]On IBM i, the HTML pages are in a file called wmqjms_javadoc.jar.
    • [z/OS]On z/OS, the HTML pages are in a file called wmqjms_javadoc.jar.
  • Support for OGSi. OSGi bundles are installed in the java\lib\OSGi directory and described in Support for OSGi.
  • The IBM MQ resource adapter, which can be deployed into any Java Platform, Enterprise Edition 7 ( Java EE 7) compliant application server.

    The IBM MQ resource adapter is in the MQ_INSTALLATION_PATH\java\lib\jca directory; for more information, see Using the IBM MQ resource adapter

  • [Windows]On Windows, symbols that can be used for debugging are installed in the MQ_INSTALLATION_PATH\java\lib\symbols directory.
The installation directory also includes some files that belong to other IBM MQ components:
  • The IBM MQ transport for SOAP, which provides a JMS transport for SOAP, is installed into the MQ_INSTALLATION_PATH\java\lib\soap directory. For further information on IBM MQ transport for SOAP, see Developing web services with IBM MQ transport for SOAP.

    From IBM MQ 9.0, the IBM MQ transport for SOAP is deprecated.

[V9.0.5 Mar 2018][V9.0.0.3 Mar 2018]The JSON4J.jar file and com.ibm.msg.client.mqlight package are not needed by the IBM MQ classes for Java and IBM MQ classes for JMS. From IBM MQ 9.0.0 Fix Pack 3 and IBM MQ 9.0.5, the following changes are therefore made to the com.ibm.mq.allclient.jar file :
  • The reference to JSON4J.jar file is removed from the class path statement within the manifest file for the com.ibm.mq.allclient.jar file.
  • The package com.ibm.msg.client.mqlight is no longer included inside the com.ibm.mq.allclient.jar file.

Sample applications

Some sample applications are supplied with IBM MQ classes for JMS. Table 2 shows where the sample applications are installed on each platform.

Table 2. Samples directories
Platform Directory
[AIX]UNIX and Linux MQ_INSTALLATION_PATH/samp/jms
[Windows]Windows MQ_INSTALLATION_PATH\tools\jms
[IBM i]IBM i /QIBM/ProdData/mqm/java/samples/jms
[z/OS]z/OS MQ_INSTALLATION_PATH/mqm/V9R0M0/java/samples/jms
  MQ_INSTALLATION_PATH/opt/mqm/samp/jms

MQ_INSTALLATION_PATH represents the high-level directory in which IBM MQ is installed.

After installation, you might need to perform some configuration tasks to compile and run applications.

Setting environment variables for IBM MQ classes for JMS describes the classpath that is required to run simple IBM MQ classes for JMS applications. This topic also describes additional JAR files that need to be referenced in special circumstances and the environment variables that you must set to run the scripts that are provided with IBM MQ classes for JMS.

To control properties, such as tracing and logging of an application, you need to provide a configuration properties file. The IBM MQ classes for JMS configuration properties file is described in The IBM MQ classes for JMS configuration file.

Relocatable JAR files

Within an enterprise, the following files can be moved to systems that need to run IBM MQ classes for JMS:
  • -com.ibm.mq.allclient.jar
  • -com.ibm.mq.traceControl.jar
  • -jms.jar
  • -fscontext.jar
  • -providerutil.jar
  • The Bouncy Castle security provider and CMS support JAR files

The fscontext.jar and providerutil.jar files are required if your application performs JNDI lookups using a file system context.

The Bouncy Castle security provider and CMS support JAR files are required. For more information, see Support for non-IBM JREs. The following JAR files are required:
  • bcpkix-jdk15on.jar
  • bcprov-jdk15on.jar
  • [V9.0.0.12 Oct 2021]bcutil-jdk15on.jar

The file com.ibm.mq.allclient.jar contains the IBM MQ classes for JMS, the IBM MQ classes for Java, and the PCF and Headers Classes. If you move this file to a new location, make sure that you take steps to keep this new location maintained with new IBM MQ Fix Packs. Also, make sure that the use of this file is made known to IBM Support if you are getting an interim fix.

To determine the version of the file com.ibm.mq.allclient.jar, use the following command:

java -jar com.ibm.mq.allclient.jar
The following example shows some sample output from this command:

C:\Program Files\IBM\MQ_1\java\lib>java -jar com.ibm.mq.allclient.jar
Name:       Java Message Service Client
Version:    9.0.0.0
Level:      p000-L140428.1
Build Type: Production
Location:   file:/C:/Program Files/IBM/MQ_1/java/lib/com.ibm.mq.allclient.jar

Name:       WebSphere MQ classes for Java Message Service
Version:    9.0.0.0
Level:      p000-L140428.1
Build Type: Production
Location:   file:/C:/Program Files/IBM/MQ_1/java/lib/com.ibm.mq.allclient.jar

Name:       WebSphere MQ JMS Provider
Version:    9.0.0.0
Level:      p000-L140428.1 mqjbnd=p000-L140428.1
Build Type: Production
Location:   file:/C:/Program Files/IBM/MQ_1/java/lib/com.ibm.mq.allclient.jar

Name:       Common Services for Java Platform, Standard Edition
Version:    9.0.0.0
Level:      p000-L140428.1
Build Type: Production
Location:   file:/C:/Program Files/IBM/MQ_1/java/lib/com.ibm.mq.allclient.jar

The file com.ibm.mq.traceControl.jar is used to dynamically control trace for IBM MQ classes for JMS applications. For more information, see Controlling trace in a running process by using IBM MQ classes for Java and IBM MQ classes for JMS.