Solved

IBM MQ JMS

Posted on 2008-10-10
4
3,606 Views
Last Modified: 2013-11-24
Hi,

I am trying to compile a code which is connecting a MQ through JMS. Now I am getting the compilation error as "package com.ibm.mq.jms does not exist".

I read in the internet that it is related to classpath but I set the classpath as below:
C:\Program Files\IBM\WebSphere MQ\lib\com.ibm.mqetclient.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\providerutil.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ibm.mqjms.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\ldap.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\jta.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\jndi.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\jms.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\connector.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\fscontext.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ibm.mq.jar;C:\Program Files\Java\jdk1.5.0_16\bin;C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ibm.mq.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ibm.mq.jms.Nojndi.jar

My code has the following reference

import com.ibm.mq.jms.MQQueue;
import com.ibm.mq.jms.MQQueueConnectionFactory;

But I couldn't find "com.ibm.mq.jms.MQQueue" or "com.ibm.mq.jms.MQQueueConnectionFactory" jar files in my machine.

My machine is running the websphere MQ server & client both are in the same machine. Also the sender & receiver both are in the same local machine "127.0.0.1". I can put manually the message in the MQ also through MQClient API no problem.

BTW forgot to mention I have installed JBuilder & I am also very new to JBuilder. The compilation error I am getting when trying to compile through JBuilder. So can be some issue with JBuilder setup also....please advise..........
Please suggest what is wrong.

Regards,
0
Comment
Question by:kakali
  • 2
  • 2
4 Comments
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 22685651
have you opened this code in jbuilder.if you doesn't set these jars properly in classpath in jbuilder then the editor will show red color lines in the code.
0
 

Author Comment

by:kakali
ID: 22687697
How to set Classpath in JBuilder? I set Classpath in the environment variable.
0
 
LVL 20

Accepted Solution

by:
chaitu chaitu earned 125 total points
ID: 22692245
0
 

Author Comment

by:kakali
ID: 22708451
Ok I could able to refer the jms jar but my problem is when I try to compile the code in Jbuilder I am getting huge number of errors. I suspect my code folder structure is not correctly set.
My source code reference the package as
package com.companyName.projectName.mq;
what should be my source file folder structure to keep these .java files. Please help me as I am new to Java & JBuilder so I need to understand how it works. I will really appreciate your help in this regard.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now