The Java EE 5 Tutorial

Compiling and Packaging the AsynchConsumer Client

    To compile and package the AsynchConsumer example using NetBeans IDE, follow these steps:

  1. In NetBeans IDE, choose Open Project from the File menu.

  2. In the Open Project dialog, navigate to tut-install/javaeetutorial5/examples/jms/simple/.

  3. Select the asynchconsumer folder.

  4. Select the Open as Main Project check box.

  5. Click Open Project.

  6. Right-click the project and choose Build.

    To compile and package the AsynchConsumer example using Ant, follow these steps:

  1. In a terminal window, go to the asynchconsumer directory:


    cd ../../asynchconsumer
    
  2. Type the following command:


    ant
    

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.