0

I have a standalone Java program which sends a message to MQ and receives a message. I need to use the wmq.jmsra.rar which has 10+ jar files in it. It works fine, if I unzip the rar and use jars in the classpath. I was wondering whether there is a way i can use this .rar file directly instead of unzipping it and adding each jar into classpath or adding the folder to classpath.

My question is related to this, but different... Is it correct or incorrect for a Java JAR to contain its own dependencies?

Thanks Jugunu

Community
  • 1
  • 1
Jugunu
  • 141
  • 3
  • 14

1 Answers1

0

The Resource Adapter (wmq.jmsra.rar) should be used when configuring a JavaEE application server. Details on getting that are at http://www-01.ibm.com/support/docview.wss?uid=swg21633761

Please don't unzip this to get at the component parts; instead use the MQ Classes for JMS 'allclient' jar or the OSGi bundles. Information on how to get those are available at http://www-01.ibm.com/support/docview.wss?uid=swg21683398

Those technotes give information for the latest releases. The 'allclient' is a v8 statement only - however installation of the client support packs (eg MQC75) will give you access to the JMS client.

Calanais
  • 1,541
  • 9
  • 10
  • thanks much calanais, that worked.. I downloaded the 8.0.0.1-WS-MQ-Install-Java-All.jar from IBM site and used the jars from JavaSE folder. Also I had to remove j2ee.jar and change compiler settings to 1.6 to remove the version conflict. – Jugunu Nov 10 '14 at 19:10
  • Hi Calanais, i am facing a unique situation.. my code is not working in server due to this error "Exception in thread "main" java.lang.UnsupportedClassVersionError: javax/jms/JMSException : Unsupported major.minor version 51.0" I am not allowed to upgrade the jre since there are many other app and the jre version is jdk1.6_45. the ibm jars are all compiled to "Build-Jdk: 1.7.0_09" (i checked the meta-inf)... Is there any work around for this issue.. I checked net and found the most used suggestion to just upgrade the jre.. With latest jre its working fine.. Thanks in advance for your time. – Jugunu Nov 11 '14 at 16:56
  • Calanais, i got the go ahead for upgrading the jdk and testing the older applications. – Jugunu Nov 11 '14 at 17:36
  • MQ v8 implements JMS2.0 which has a requirement on Java 7. That error is telling you that the classfiles are compiled for Java7 but you've got a Java6 runtime. The option is to update the JRE as you've been able to do. Pleased you've got the update through. – Calanais Nov 11 '14 at 22:47