IBM Support

Java MQException Class moved to the com.ibm.mq.jmqi.jar file in MQ V7

Question & Answer


Question

Why was the Java™ MQException Class moved to the com.ibm.mq.jmqi.jar file in WebSphere MQ V7.0?

Answer

The move of the MQException class to the new com.ibm.mq.jmqi.jar was as a result of significant re-engineering that was implemented across the MQ classes for Java and the MQ classes for JMS. The JMS classes (com.ibm.mq.jms.jar) and Java classes (com.ibm.mq.jar) are now independent and stand as peers, therefore the MQException Class was moved to a common JAR file that can be used by either the Java and JMS libraries.

In MQ V7, if you use Java 2 Software Development Kit (SDK) Version 1.5 or later (1.6, 1.7, etc). to compile your applications, it will read the manifest of com.ibm.mq.jar and automatically pick up dependent JARs such as com.ibm.mq.jmqi.jar.

However, if you compile your Java code using the SDK Version 1.4.2, you must add the following JAR files to your class path so that they will be picked up.

  • jms.jar
  • com.ibm.mq.jmqi.jar

Therefore to avoid any problems associated with the this necessary class change, use Java 1.5 to compile your applications (for example, pointing Rational Application Developer or RAD), or if you are using Java 1.4, add the extra JAR files to the classpath used in compiling applications.

Additional information
See: Environment variables used by WebSphere MQ classes for JMS

[{"Product":{"code":"SSFKSJ","label":"WebSphere MQ"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Java","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"7.5;7.1;7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Product Synonym

wmq mq

Document Information

Modified date:
15 June 2018

UID

swg21316673