Verifying the IBM MQ classes for Java installation

An installation verification program, MQIVP, is supplied with IBM® MQ classes for Java. You 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 you want to verify. Use the following procedure to verify your installation:
  1. If you are going to run the program in client mode, configure your queue manager as described in Preparing and running the sample programs. The queue to use is SYSTEM.DEFAULT.LOCAL.QUEUE.
  2. If you are going to run the program in client mode, see also Using IBM MQ classes for Java.

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

  3. Make sure that you 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/java/samples/wmqjava, where MQ_INSTALLATION_PATH is the path to your 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 your 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: Put a message to SYSTEM.DEFAULT.LOCAL.QUEUE
Success: Got a message from SYSTEM.DEFAULT.LOCAL.QUEUE
Success: Disconnected from queue manager

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