Obtaining the IBM MQ classes for JMS separately
The IBM MQ classes for JMS are available within a self-extracting JAR file that we can download from Fix Central if we want to obtain just the IBM MQ classes for JMS JAR files, for deployment into a software management tool, or to use with stand-alone client applications.
Before starting
Before starting this task, make sure that we have a Java runtime environment (JRE) installed on your machine and that the JRE has been added to the system path.
The Java installer that is used in this installation process does not require running as root or any specific user. The only requirement is that the user it is run as has access write to the directory that we want the files to go in.
About this task
Before IBM MQ Version 8.0, the IBM WebSphere MQ classes for Java or IBM WebSphere MQ classes for JMS are not available as a separate download. For IBM WebSphere MQ Version 7.5 or earlier, if we are developing and running Java language applications that use either the IBM WebSphere MQ classes for Java or IBM WebSphere MQ classes for JMS, we need to install them either by performing a full server installation or by installing one of the client SupportPacs onto the system where the application is being developed and the system where the application will run. This installation installs many more files than the IBM WebSphere MQ classes for Java and IBM WebSphere MQ classes for JMS files.
However, from IBM MQ Version 8.0, the following files are available within a self-extracting JAR file, which minimizes the size of the download and installation, and the time that is required to perform the installation:
- The IBM MQ classes for JMS
- The IBM MQ classes for Java
- The IBM MQ resource adapter
- The IBM MQ OSGi bundles
When you run the executable JAR file, it displays the IBM MQ license agreement, which must be accepted. It asks for a directory in which to install the IBM MQ classes for Java, IBM MQ classes for JMS, the resource adapter, and OSGi bundles. If the selected installation directory does not exist, it is created and the program files are installed. However, if the directory exists, an error is reported and no files are installed.
Procedure
- Download the IBM MQ Java / JMS client JAR file from Fix Central.
- Click this link: IBM MQ Java / JMS client.
- Find the client for the version of IBM MQ in the displayed list of available fixes. For example:
release level: 9.1.4.0-IBM-MQ-Install-Java-All Continuous Delivery Release:9.1.4 IBM MQ JMS and Java 'All Client'Then click the client file name and follow the download process.
- Start the installation from the directory to which you downloaded the file. To start the installation, enter a command in the following format:
java -jar V.R.M.F-IBM-MQ-Install-Java-All.jarwhere V.R.M.F is the product version number, for example 9.1.4.0, and V.R.M.F-IBM-MQ-Install-Java-All.jar is the name of the file that was downloaded from Fix Central. For example, to install the Java / JMS client for the Version 9.1.4 release, you would use the following command:java -jar 9.1.4.0-IBM-MQ-Install-Java-All.jarNote: To carry out this installation, we must have a JRE installed on your machine and added to the system path. When you enter the command, the following information is displayed:Before we can use, extract, or install IBM MQ V9.1, we must accept the terms of 1. IBM International License Agreement for Evaluation of Programs 2. IBM International Program License Agreement and additional license information. Please read the following license agreements carefully. The license agreement is separately viewable using the --viewLicenseAgreement option. Press Enter to display the license terms now, or 'x' to skip.- Review and accept the license terms:
- To display the license, press Enter. Alternatively, pressing x skips the display of the license. After the license is displayed, or immediately if you select x, the following message is displayed:
Additional license information is separately viewable using the --viewLicenseInfo option. Press Enter to display additional license information now, or 'x' to skip.- To display the additional license terms, press Enter. Alternatively, pressing x skips the display of the additional license terms. After the additional license terms are displayed, or immediately if you select x, the following message is displayed:
By choosing the "I Agree" option below, you agree to the terms of the license agreement and non-IBM terms, if applicable. If we do not agree, select "I do not Agree". Select [1] I Agree, or [2] I do not Agree:- To accept the license agreement and continue with selecting the installation directory, select 1. Alternatively, selecting 2 ends the installation immediately. If you select 1, the following message appears:
Enter directory for product files or leave blank to accept the default value. The default target directory is H:\WMQ Target directory for product files?
- Specify the installation directory for the Java / JMS client:
- To install the product files in the default location, press Enter without specifying a value.
- To install the product files in a different location from the default, specify the name of the directory in which we want to install the product files, and then press Enter to start the installation.
The directory name that you specify must not already exist, otherwise, when you start the installation, an error is reported and no files are installed. Provided that it does not already exist, the selected installation directory is created and the program files are installed in this directory. During the installation, a new directory with the name wmq is created within the installation directory that you selected. Three subdirectories, JavaEE, JavaSE, and OSGi, are created in the wmq directory with the following contents:
.\JavaEE: wmq.jmsra.ivt.ear wmq.jmsra.rar .\JavaSE: com.ibm.mq.allclient.jar com.ibm.mq.traceControl.jar fscontext.jar jms.jar providerutil.jar .\OSGi: com.ibm.mq.osgi.allclient_V.R.M.F.jar com.ibm.mq.osgi.allclientprereqs_V.R.M.F.jarwhere V.R.M.F is the Version, Release, Modification, and Fix Pack number. When the installation is complete, a confirmation message is displayed as shown in the following example:Extracting files to H:\WMQ\wmq Successfully extracted all product files.Parent topic: Use IBM MQ classes for JMS