Posted on Monday, 7th September 2009 by Balazs

Intro

Snow Leopard comes with a native 64 bit Java 1.6 environment. The Open MQ binaries are made for the JDK 1.5 in 32 bit. This article shows how to make Open MQ work on OS X 1.6 by compiling from source.

Steps

  • Set environment
    export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
    export ANT_HOME=$HOME/apache-ant-1.7.1
    export ANT_OPTS=-Xmx512m
    export IMQ_HOME=$HOME/mq/dist/mq
    export CLASSPATH=$CLASSPATH:$IMQ_HOME/lib/jms.jar:$IMQ_HOME/lib/imq.jar
  • Download and unpack ant in your home directory
  • Download and uppack OpenMQ 4.4 source in your home directory
  • Create extlib:
    mkdir ~/mq/extlib
  • Download the Java EE 5 API into extlib:

    http://download.java.net/maven/1/javaee/jars/javaee-api-5.jar

  • Compile Open MQ:
    cd ~/mq
    ant
  • Test Open MQ:
    cd dist/mq/bin
    ./imqbrokerd -tty &
    cd ../examples/helloworld/helloworldmessage
    java HelloWorldMessage
    You should see
    Sending Message: Hello World
    Read Message: Hello World
    And some debug messages on the imqbrokerd console.

References

Share and Enjoy:
  • Print
  • LinkedIn
  • Facebook
  • FriendFeed
  • Twitter
  • Digg
  • Sphinn
  • del.icio.us
  • Mixx
  • Google Bookmarks
  • Slashdot
  • Yahoo! Buzz
  • Yahoo! Bookmarks
  • RSS
  • Ping.fm
  • email
  • PDF

Tags:
Posted in Java, Technology | Comments (Comments)

blog comments powered by Disqus