Solved

IBM MQ JMS

Posted on 2008-10-10
4
3,661 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
javap not working 8 58
MySqlDump not dumping triggers 1 43
Java class and jar 3 22
Using jdbcTemplate.batchUpdate to improve INSERT performance 6 22
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn how to implement Singleton Design Pattern in Java.

856 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