+

Search Tips | Advanced Search

Verify the IBM MQ classes for Java installation

An installation verification program, MQIVP, is supplied with IBM MQ classes for Java. We can use this program to test all the connection modes of IBM MQ classes for Java.

The program prompts for a number of choices and other data to determine which connection mode we want to verify. Use the following procedure to verify your installation:
  1. If we are going to run the program in client mode, configure your queue manager as described in Configure a queue manager to accept client connections on Windows, UNIX and IBM i noting that the queue to be used is SYSTEM.DEFAULT.LOCAL.QUEUE.
  2. If we are going to run the program in client mode, see also Use IBM MQ classes for Java.

    Perform the remaining steps of this procedure on the system on which we are going to run the program.

  3. Make sure that we have updated your CLASSPATH environment variable according to the instructions in Environment variables relevant to IBM MQ classes for Java.
  4. Change Directory to MQ_INSTALLATION_PATH/mqm/samp/wmqjava/samples, where MQ_INSTALLATION_PATH is the path to the IBM MQ installation. Then at the command prompt, enter:
    java -Djava.library.path= library_path MQIVP
    
    where library_path is the path to the IBM MQ classes for Java libraries (see IBM MQ classes for Java libraries ). At the prompt marked (1):

    • To use a TCP/IP connection, enter an IBM MQ server host name.
    • To use native connection (bindings mode), leave the field blank (do not enter a name).

    The program tries to:

    • 1. Connect to the queue manager
    • 2. Open the queue SYSTEM.DEFAULT.LOCAL.QUEUE, put a message on the queue, get a message from the queue, and then close the queue
    • 3. Disconnect from the queue manager
    • 4. Return a message if the operations are successful

Here is an example of the prompts and responses you might see. The actual prompts and your responses depend on the IBM MQ network.

Please enter the IP address of the MQ server    : ipaddress(1)
Please enter the port to connect to             : (1414) (2)
Please enter the server connection channel name : channelname (2)
Please enter the queue manager name             : qmname
Success: Connected to queue manager.
Success: Opened SYSTEM.DEFAULT.LOCAL.QUEUE
Success: Put a message to SYSTEM.DEFAULT.LOCAL.QUEUE
Success: Got a message from SYSTEM.DEFAULT.LOCAL.QUEUE
Success: Closed SYSTEM.DEFAULT.LOCAL.QUEUE
Success: Disconnected from queue manager


Tests complete -
SUCCESS: This MQ Transport is functioning correctly.
Press Enter to continue ...
Note:
  1. On z/OS, leave the field blank at prompt marked (1).
  2. If you choose server connection, we do not see the prompts marked (2).
  3. On IBM i, we can only issue the java MQIVP command from QShell. Alternatively, we can run the application by using the CL command RUNJVA CLASS(MQIVP).

Parent topic: Installing and configuring IBM MQ classes for Java

Last updated: 2020-10-04