Build Requirements ------------------ 1. JDK 1.5.0_09 or higher 2. NetBeans 5.5 Build MQ with NetBeans IDE -------------------------- 1. Unjar the MQ source-code JAR file jar xvf .jar 2. In the mq directory, create a new directory called extlib cd $TOP/mq mkdir extlib 3. Download Java EE 5 API (javaee-api-5.jar) from Java.net Maven Repository https://maven-repository.dev.java.net/ 4. Copy javaee-api-5.jar to $TOP/mq/extlib directory 5. Download JavaHelp 2.0 (jhall.jar) from JavaHelp web site http://java.sun.com/products/javahelp/ 6. Copy the jhall.jar file to $TOP/mq/extlib directory 7. Start NetBeans IDE 8. In the IDE, choose File > New Project 9. Choose General category > Java Project with Existing Sources, and click Next 10. In the Project Name field, type OpenMQ 11. In the Project Folder field, type full path to mq directory, and click Next 12. In the Source Packages Folder pane, click Add Folder, select src/share/java folder, and click Finish 13. In Projects tab of the IDE, right click on the OpenMQ project, and select Properties 14. Select Libraries, Compile tab, and click Add Library 15. Click Manage Libraries... 16. Click New Library... 17. In the Library Name field, type MQ-External, and click OK 18. Select MQ-External library, and click Add Jar/Folder 19. Select the javaee-api-5.jar, jhall.jar, and click Add Jar/Folder 20. In the Library Manager window, click OK 21. In the Add Library window, select MQ-External library, and click Add Library 22. Click OK to close the the Project Properties window 23. In the IDE, choose Build > Clean, and Build Main Project Run MQ with NetBeans IDE ------------------------ 1. In the mq directory, create a new directory called opt/lib/props 2. Copy MQ default properties files to opt/lib/props/ cp -r $TOP/mq/src/share/props/broker/ $TOP/mq/opt/lib/props/ 3. Copy MQ version property file to $TOP/mq/build/classes cp version.properties $TOP/mq/build/classes/com/sun/messaging/jmq/version.properties 4. In Projects tab of the IDE, right click on the OpenMQ project, and select Properties 5. Select Run 6. In the Main Class field, type com.sun.messaging.jmq.jmsserver.Broker 7. In the Arguments field, type -tty 8. In the Working Directory field, type full path to mq directory 9. In the VM Options field, type -server -Xms32m -Xmx192m -Xss128k -Dimq.home=$TOP/mq/opt 10. Click OK to close the the Project Properties window 11. In the IDE, choose Run > Run Main Project Verify the Build ---------------- 1. In the mq directory, run the HelloWorldMessage sample program to verify the build was successful java -cp $TOP/mq/build/classes HelloWorldMessage 2. Here is a sample output of the HelloWorldMessage program: Sending Message: Hello World Read Message: Hello World