Build Requirements ------------------ 1. JDK 1.5.0_09 or higher 2. NetBeans 6.1 Build MQ with NetBeans IDE -------------------------- 1. Unzip the MQ source-code zip bundle. unzip .zip 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. Copy other external jars to the $TOP/mq/extlib directory. cp $TOP/mq/src/buildcfg/tools/ri/javahelp/jhall.jar $TOP/mq/extlib cp $TOP/mq/src/buildcfg/tools/ri/grizzly/grizzly.jar $TOP/mq/extlib cp $TOP/mq/src/buildcfg/tools/ri/jta/jta.jar $TOP/mq/extlib cp $TOP/mq/src/buildcfg/tools/ri/servlet2.5/lib/servlet-2_5-api.jar $TOP/mq/extlib 6. Start the NetBeans IDE. 7. In the IDE, choose File > New Project 8. Under Categories, select Java > Java Project with Existing Sources, and click Next. 9. In the Project Name field, type OpenMQ. 10. In the Project Folder field, type full path to mq directory, and click Next. 11. In the Source Packages Folders pane, click Add Folder, select src/share/java folder, and click Finish. 12. In Projects tab of the IDE main screen, right click on the OpenMQ project, and select Properties. 13. Select Libraries, Compile tab, and click on Add Library. 14. Click on the Create button. 15. In the Library Name field, type MQ-External, and click on Add Library. 16. Select the MQ-External library, and click on Add Jar/Folder 17. Browse to your $TOP/mq/extlib directory and select the javaee-api-5.jar, jhall.jar, grizzly.jar, jta.jar, and servlet-2_5-api.jar files then click on Add Jar/Folder. 18. In the Customize Library Manager window, click OK. 19. In the Add Library window, select MQ-External library, and click Add Library 20. Click on OK to close the the Project Properties window. 21. 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