FreeKB - IBM MQ Install MQ Explorer in Eclipse
IBM MQ - Install MQ Explorer in Eclipse

Eclipse is going to need the file to install the packages. To get, on the MQ Server, install the MQ Series JRE and MQ Series Explorer packages. After these packages are installed, copy the folder from the /opt/mqm/mqexplorer/eclipse directory to the machine that is running Eclipse.

~]# cd /opt/MQServer
~]# rpm -ivh MQSeriesJRE-<version>
~]# rpm -ivh MQSeriesExplorer-<version>


Install IBM MQ Explorer.

  1. In Eclipse, select Help > Install New Software.
  2. Select Add.
  3. Select Archive.
  4. Select
  5. Check IBM MQ Explorer.
  6. Select Next.
  7. Select Next.
  8. Select Finish.


Setup Eclipse.

  1. In Eclipse, select  File > New > Java Project.
  2. Give your project a name, such as myMQProject and select Finish.
  3. In the left panel of Eclipse, expand myMQProject, right-click on the src folder and select New > Class.
  4. Give the new class a name, such as SimpleJMSProducer, and select Finish.
  5. Add the following markup.
    • Replace MANAGER01 with the name of your WebSphere MQ manager.

This code was created by Riyafa Abdul Hameed -


public class SimpleJMSProducer
    public void sendMsg(String msg)
        MQQueueManager queueManager = null;
        MQMessage mqMessage = null;
        MQPutMessageOptions myPMO = null;


            // creating queue manager
            queueManager = new MQQueueManager("MANAGER01");

            // creating queue`
            MQQueue queue = queueManager.accessQueue("MQ.REQUEST", CMQC.MQOO_OUTPUT);

            // configuring message encoding, character set, and format
            mqMessage = new MQMessage();
            mqMessage.encoding = new Integer("546");
            mqMessage.characterSet = new Integer("1208");
            mqMessage.format = "MQSTR";

            // sending message
            myPMO = new MQPutMessageOptions();
            queue.put(mqMessage, myPMO);
            // Closing Queue after putting message

        } catch (MQException | NumberFormatException | IOException je)
        } finally
            if (queueManager != null) try
                // Disconnecting queue manager
            } catch (MQException ex) {

    public static void main(String[] args)
        new SimpleJMSProducer().sendMsg("Hello world!!!");
  1. Select the green play button, and ensure Hello World is displayed in the console, and a pop-up box with text How are you today should also appear.


Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter 6b547 in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |