10.12.2012 Views

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Building, Packaging, and Deploying Duke’s Bank<br />

Using Ant<br />

To compile and package the enterprise beans, application client, and web client into<br />

dukesbank.ear,gotothetut-install/javaeetutorial5/examples/dukesbank/ directory of the<br />

tutorial distribution and execute the command:<br />

ant<br />

Run the following command to deploy dukesbank.ear:<br />

ant deploy<br />

This task calls the create-tables task to initialize the database tables.<br />

Running the Duke's Bank Application Client Using<br />

NetBeans IDE<br />

To run the application client in NetBeans IDE, follow these steps:<br />

1. In NetBeans IDE, select the dukesbank project in the Projects pane.<br />

2. Right-click dukesbank and select Run.<br />

3. At the login prompts, type bankadmin for the user name and javaee for the password. You<br />

should see the application client, as shown in Figure 37–5.<br />

You can now create customers and accounts using the application client.<br />

Running the Duke's Bank Application Client Using Ant<br />

To run the application client, follow these steps:<br />

Building, Packaging, Deploying, and Running the Duke's Bank Application<br />

1. In a terminal window, go to tut-install/javaeetutorial5/examples/dukesbank/.<br />

2. Enter the following command:<br />

ant run<br />

3. At the login prompts, type bankadmin for the user name and javaee for the password. You<br />

should see the application client, as shown in Figure 37–5.<br />

You can now create customers and accounts using the application client.<br />

Chapter 37 • <strong>The</strong> Duke’s Bank Application 1069

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!