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 » General IBM MQ Support » compile/run Java programs on AIX

Post new topic  Reply to topic
 compile/run Java programs on AIX « View previous topic :: View next topic » 
Author Message
Agent MQ
PostPosted: Thu May 01, 2003 10:28 am    Post subject: compile/run Java programs on AIX Reply with quote

Novice

Joined: 04 Apr 2003
Posts: 19

Maybe this is the question I should havew asked originally..

I use java on windows platform great but now I want to learn how to write some MQ programs in java on the AIX.

the AIX OS is 5.1 and MQ is 5.2

i looked and I see /usr/java130/bin/ and I see javac etc so it appears I would be able to write some simple java programs -

my question is:

1-how would i go about writing a simple "hello world" pgm, compile it and run it on the aix.

2-write a simple MQput pgm in java

3- write a pcf pgm in java(i think i may need to install the msob support pac for this one)

thanks in advance
Back to top
View user's profile Send private message
bower5932
PostPosted: Thu May 01, 2003 10:55 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

I'd suggest grabbing a java program from the Software Repository on this site or from http://www.developer.ibm.com/tech/sampmq.html. You ought to be able to then "javac progname.java" to compile it. You'll then be able to "java progname" to run it. You'll need to make sure that your classpath is set correctly. There are details in the Using Java manual, and you can also do searches on this site.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Agent MQ
PostPosted: Thu May 01, 2003 11:20 am    Post subject: Reply with quote

Novice

Joined: 04 Apr 2003
Posts: 19

sweet, thanks bower. I will go try it out.
Back to top
View user's profile Send private message
ucbus1
PostPosted: Thu May 01, 2003 11:28 am    Post subject: Reply with quote

Knight

Joined: 30 Jan 2002
Posts: 560

Agent MQ,
here is a sample script for setting the needed java environment, some of the jars I mentioned may not be applicable to you. let me know if it helps

!/bin/sh
JREHOME=/usr/java130
export JREHOME
export PATH=/usr/java130/bin:/usr/java130/jre/bin:$PATH
export LIBPATH=$LIBPATH:/usr/mqm/java/lib
export CLASSPATH=$CLASSPATH:/usr/mqm/java/lib/com.ibm.mq.jar
export CLASSPATH=$CLASSPATH:/usr/lpp/fmc/bin/java3322/fmcojagt.jar
export CLASSPATH=$CLASSPATH:/usr/mqm/java/lib
export CLASSPATH=$CLASSPATH:/usr/mqm/java/lib/connector.jar
export CLASSPATH=$CLASSPATH:/usr/mqm/java/lib/jconn2.jar
export CLASSPATH=$CLASSPATH:/usr/mqm/java/lib/jta.jar
export CLASSPATH=$CLASSPATH:/usr/mqm/java/lib/xerces.jar
export CLASSPATH=$CLASSPATH:/workflow/dvlp/lib/syslib.jar
export CLASSPATH=$CLASSPATH:/workflow/dvlp/lib/MQ.jar
export CLASSPATH=$CLASSPATH:/workflow/dvlp/lib/"*****your Java files ".jar

$JREHOME/bin/java "your program".java

Hope this helps
Back to top
View user's profile Send private message Send e-mail
Agent MQ
PostPosted: Thu May 01, 2003 12:08 pm    Post subject: Reply with quote

Novice

Joined: 04 Apr 2003
Posts: 19

I do not see a directory for /usr/mqm/java/lib...

only /usr/java130
Back to top
View user's profile Send private message
bower5932
PostPosted: Thu May 01, 2003 12:54 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

Since you're on MQ 5.2, you probably haven't installed the MA88 SupportPac which gives you the MQ java classes:

http://www-3.ibm.com/software/integration/support/supportpacs/individual/ma88.html
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » compile/run Java programs on AIX
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.