J2EE[tm] Blueprints > Java[tm] Pet Store > Installation

Installation

This document describes how to install and configure the Java Pet Store application on UNIX and Win32 machines.

Before you begin

Before installing the Java Pet Store, make sure the following items are installed on your system:

Also make sure to set the environment variables JAVA_HOME and J2EE_HOME as follows:

Deploying the application

These instructions describe how to deploy the application on the J2EE Reference Implementation server (which comes with the J2EE SDK), and configure it to use the Cloudscape database.


Note: These instructions use $JPS_HOME (UNIX) and %JPS_HOME% (Win32) to denote the root directory of the J2EE Blueprints bundle.
  1. Start the Cloudscape database server.

    Bring up a command or shell prompt. Change the current directory to $J2EE_HOME/bin (UNIX) or %J2EE_HOME%\bin (Win32) and enter the following command:

    cloudscape -start

  2. Start the J2EE Reference Implementation server.

    Bring up another command or shell prompt. Change the current directory to $J2EE_HOME/bin (UNIX) or %J2EE_HOME%\bin (Win32) and enter the following command:

    j2ee -verbose

  3. Start the J2EE Reference Implementation deployment tool.

    Bring up another command or shell prompt. Change the current directory to $J2EE_HOME/bin (UNIX) or %J2EE_HOME%\bin (Win32) and enter the following command:

    deploytool

  4. Deploy the application.

    From the File menu, select Open Application.... In the subsequent file dialog, open petstore.ear, which can be found in $JPS_HOME (UNIX) or %JPS_HOME% (Win32).

    Then, from the Tools menu, select Deploy Application. Click through the subsequent dialogs to complete the deployment. You shouldn't have to change any of the default values.

Testing the application

The page linked below has links for visiting three versions of the store: the default (US English) version, the annotated version and the Japanese version.

If you click on any of the links, you'll be redirected to a page which asks you to install the database tables that are required by the Java Pet Store. Click Install Tables in the banner, and on the subsequent page, click the appropriate link to install the Java Pet Store tables for your particular database.

Once the tables are installed, click Return to Java Pet Store in the banner to return to the initial page. On that page, click the link for the version of the store you wish to enter.

To install the Java Pet Store database tables and visit the store, click the following link:

http://localhost:8000/estore/index.html


Note: These instructions assume that the application is deployed on a machine named localhost and port 8000. You should substitute localhost and 8000 with the name of the machine and the port on which the application is deployed.

Copyright © 2001 Sun Microsystems, Inc. All Rights Reserved.