background image

Building the consumeremote Modules

<< Resources for the consumeremote Example | Running the consumeremote Modules Using Ant >>
<< Resources for the consumeremote Example | Running the consumeremote Modules Using Ant >>

Building the consumeremote Modules

Building, Deploying, and Running the
consumeremote
Modules Using NetBeans IDE
To package the modules using NetBeans IDE, perform 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/consumeremote/.
3. Select the earthmdb folder.
4. Select the Open as Main Project check box.
5. Click Open Project Folder.
6. Right-click the earthmdb project and choose Build Project.
This command creates a JAR file that contains the bean class file and the sun-ejb-jar.xml
deployment descriptor file.
7. Choose Open Project from the File menu.
8. Select the jupiterclient folder.
9. Select the Open as Main Project check box.
10. Click Open Project Folder.
11. Right-click the jupiterclient project and choose Build Project.
This target creates a JAR file that contains the client class file and a manifest file.
To deploy the earthmdb module and run the application client, perform these steps:
1. Right-click the earthmdb project and choose Set Main Project.
2. Right-click the earthmdb project and choose Deploy Project.
3. Copy the jupiterclient module to the remote system (jupiter):
a. In a terminal window, change to the directory
tut-install/javaeetutorial5/examples/jms/consumeremote/jupiterclient/dist/.
b. Type a command like the following:
cp jupiterclient.jar F:/
That is, copy the client JAR file to a location on the remote filesystem.
4. Go to the directory on the remote system where you copied the client JAR file.
5. Use the following command:
appclient -client jupiterclient.jar
On jupiter, the output of the appclient command looks like this:
An Application Example That Consumes Messages from a Remote Server
The Java EE 5 Tutorial · September 2007
982