ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » package com.ibm.mq does not exist

Post new topic  Reply to topic Goto page Previous  1, 2
 package com.ibm.mq does not exist « View previous topic :: View next topic » 
Author Message
vennela
PostPosted: Wed Dec 29, 2004 11:37 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

This is nothing but a classpath problem.

Based on your earlier post This is how your classpath should look like

SET CLASSPATH=C:\Program Files\IBM\Websphere MQ\Java\lib\com.ibm.mq.jar;C:\Program Files\IBM\Websphere MQ\Java\lib\connector.jar;C:\Program Files\IBM\Websphere MQ\Java\lib\com.ibm.mqbind.jar;C:\Program Files\IBM\Websphere MQ\Java\lib\provderutil.jar;.;..;%CLASSPATH%

Then run your java program. It should work.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
fjb_saper
PostPosted: Wed Dec 29, 2004 1:32 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20763
Location: LI,NY

add the jndi.jar for WAS. If using pub sub add rmm.jar

If using stand alone and not was add jms.jar and jta.jar

Enjoy
Back to top
View user's profile Send private message Send e-mail
mqmhr
PostPosted: Wed Dec 29, 2004 8:09 pm    Post subject: Reply with quote

Centurion

Joined: 28 Dec 2004
Posts: 105

Make sure that the MQSample class file is placed in a folder that is in classpath. When you execute "java MQSample", the JVM tries to locate the class file in the system classpath and if unable to locate it, throws NoClassDefFoundError.

Good Luck!
Back to top
View user's profile Send private message
sebastian
PostPosted: Thu Dec 30, 2004 4:52 am    Post subject: Reply with quote

Centurion

Joined: 12 Nov 2003
Posts: 110
Location: Philadelphia

I updated the system CLASSPATH just as vennela indicated and rebooted. I then compiled in the C:\Program Files\IBM\Websphere MQ\Java folder. I tried to run "java MQSample" and got the same error.

very strange....

_________________
sebastian signature
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Thu Dec 30, 2004 4:59 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

sebastian wrote:
I updated the system CLASSPATH just as vennela indicated and rebooted. I then compiled in the C:\Program Files\IBM\Websphere MQ\Java folder. I tried to run "java MQSample" and got the same error.

very strange....


It's not very strange. It just means you don't understand the solution that's been given...

Instead of updating the System Environment to set your classpath, you can specify "-classpath" as a parameter to javac, and I believe you have to use "-cp" for java. (Maybe "-classpath" works...).

So, try using these options to completely specify only the classpath you need.

BUT REMEMBER - you are working on a command line. SPACES matter. So either use the short form of windows file paths (c:\progra~1\ instead of c:\program files, for instance), or use QUOTES to protect the spaces ("c:\program files\" instead of c:\program files).
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
sebastian
PostPosted: Fri Dec 31, 2004 9:43 am    Post subject: Reply with quote

Centurion

Joined: 12 Nov 2003
Posts: 110
Location: Philadelphia

I got it...thanks for everyone's input!!

happy new year,
Sebastian
_________________
sebastian signature
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » IBM MQ Java / JMS » package com.ibm.mq does not exist
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.