To compile and package the AsynchConsumer example using NetBeans IDE, follow these steps:
In NetBeans IDE, choose Open Project from the File menu.
In the Open Project dialog, navigate to tut-install/javaeetutorial5/examples/jms/simple/.
Select the asynchconsumer folder.
Select the Open as Main Project check box.
Click Open Project.
Right-click the project and choose Build.
To compile and package the AsynchConsumer example using Ant, follow these steps:
In a terminal window, go to the asynchconsumer directory:
Type the following command:
The targets package both the main class and the message listener class in the JAR file and place the file in the dist directory for the example.