background image

The SynchConsumer Example

<< Starting the JMS Provider | Running the Clients >>
<< Starting the JMS Provider | Running the Clients >>

The SynchConsumer Example

The build.xml file for each example contains Ant targets that compile and package the
example. The targets place the .class file for the example in the build/jar directory. Then the
targets use the jar command to package the class file and the manifest file in an application
client JAR file.
To compile and package the Producer and SynchConsumer examples 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 producer folder.
4. Select the Open as Main Project check box.
5. Click Open Project Folder.
6. Right-click the project and choose Build Project.
7. In NetBeans IDE, choose Open Project from the File menu.
8. In the Open Project dialog, navigate to
tut-install/javaeetutorial5/examples/jms/simple/.
9. Select the synchconsumer folder.
10. Select the Open as Main Project check box.
11. Click Open Project Folder.
12. Right-click the project and choose Build Project.
To compile and package the Producer and SynchConsumer examples using Ant, follow these
steps:
1. In a terminal window, go to the producer directory:
cd producer
2. Type the following command:
ant
3. In a terminal window, go to the synchconsumer directory:
cd ../synchconsumer
4. Type the following command:
ant
The targets place the application client JAR file in the dist directory for each example.
Writing Simple JMS Client Applications
The Java EE 5 Tutorial · September 2007
916