The following software is required to run the examples.
To build, deploy, and run the examples, you need a copy of the Java Platform, Standard Edition 6.0 Software Development Kit (JDK 6). You can download the JDK 6 software from http://java.sun.com/javase/downloads/index.jsp.
Download the current JDK update that does not include any other software (such as NetBeans or Java EE).
Sun GlassFishTM Enterprise Server v3 is targeted as the build and runtime environment for the tutorial examples. To build, deploy, and run the examples, you need a copy of the Enterprise Server and, optionally, NetBeans IDE. To obtain the Enterprise Server, you must install the Java EE 6 Software Development Kit (SDK), which you can download from http://java.sun.com/javaee/downloads/. Make sure you download the Java EE 6 SDK, not the Java EE 6 Web Profile SDK.
During the installation of the SDK:
Configure the Enterprise Server administration username and password as anonymous. This is the default setting.
Accept the default port values for the Admin Port (4848) and the HTTP Port (8080).
Allow the installer to download and configure the Update Tool. If you access the Internet through a firewall, provide the proxy host and port.
This tutorial refers to the directory where you install the Enterprise Server as as-install-parent. For example, the default installation directory on Microsoft Windows is C:\glassfishv3, so as-install-parent is C:\glassfishv3. The Enterprise Server itself is installed in as-install, the glassfish directory under as-install-parent. So on Microsoft Windows, as-install is C:\glassfishv3\glassfish.
After you install the Enterprise Server, add the following directories to your PATH to avoid having to specify the full path when you use commands:
as-install-parent/bin as-install/bin
Ant is a Java technology-based build tool developed by the Apache Software Foundation (http://ant.apache.org/), and is used to build, package, and deploy the tutorial examples. To run the tutorial examples, you need Ant 1.7.1. If you do not already have Ant 1.7.1, you can install it from the Update Tool that is part of the Enterprise Server.
Start the Update Tool.
Expand the GlassFish v3 node.
Select the Available Add-ons node.
From the list, select the Apache Ant Build Tool checkbox.
Click Install.
Accept the license agreement.
After installation, Apache Ant appears in the list of installed components. The tool is installed in the as-install-parent/ant directory.
To use the ant command, add as-install/ant/bin to your PATH environment variable.
The tutorial example source is contained in the tutorial component. To obtain the tutorial component, use the Update Tool.
Start the Update Tool.
Expand the GlassFish v3 node.
Select the Available Add-ons node.
From the list, select the Java EE 6 Tutorial checkbox.
Click Install.
Accept the license agreement.
After installation, the Java EE 6 Tutorial appears in the list of installed components. The tool is installed in the as-install/docs/javaee-tutorial directory. This directory contains two subdirectories, docs and examples. The examples directory contains subdirectories for each of the technologies discussed in the tutorial.
The NetBeans integrated development environment (IDE) is a free, open-source IDE for developing Java applications, including enterprise applications. NetBeans IDE supports the Java EE platform. You can build, package, deploy, and run the tutorial examples from within NetBeans IDE.
To run the tutorial examples, you need the latest version of NetBeans IDE. You can download NetBeans IDE from http://www.netbeans.org/downloads/index.html.
To run the tutorial examples in NetBeans IDE, you must register your Enterprise Server installation as a NetBeans Server Instance. Follow these instructions to register the Enterprise Server in NetBeans IDE.