| J2EE[tm] Blueprints > Java[tm] Pet Store > Installation |
This document describes how to install and configure the Java Pet Store application on UNIX and Win32 machines.
Before installing the Java Pet Store, make sure the following items are installed on your system:
Java 2 Platform, Standard Edition SDK (J2SETM SDK): v1.3 download (preferred) | v. 1.2.2 download
Java 2 Platform, Enterprise Edition SDK (J2EETM SDK): v1.2.1 download
Also make sure to set the environment variables
JAVA_HOME and J2EE_HOME as follows:
JAVA_HOME must point to the root directory of your
J2SE SDK installation. For example, if you installed the J2SE SDK in
/usr/local/java/jdk1.3, then that path should be the
value of JAVA_HOME.
J2EE_HOME must point to the root directory of your
J2EE SDK installation. For example, if you installed the J2EE SDK in
c:\j2sdkee1.2.1, then that path should be the value of
J2EE_HOME.
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. |
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
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
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
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.
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. |