blob: d9fdd8a694a30b555ca54dbea9ed435265342582 [file] [log] [blame]
type=page
status=published
title=Setting Up a Development Environment
next=class-loaders.html
prev=part-tasks-and-tools.html
~~~~~~
= Setting Up a Development Environment
[[GSDVG00002]][[beaaq]]
[[setting-up-a-development-environment]]
== 1 Setting Up a Development Environment
This chapter gives guidelines for setting up an application development
environment in the {productName}. Setting up an environment
for creating, assembling, deploying, and debugging your code involves
installing the mainstream version of the {productName} and making use
of development tools. In addition, sample applications are available.
The following topics are addressed here:
* link:#beaar[Installing and Preparing the Server for Development]
* link:#beaas[High Availability Features]
* link:#beaat[Development Tools]
* link:#beabf[Sample Applications]
[[beaar]][[GSDVG00090]][[installing-and-preparing-the-server-for-development]]
=== Installing and Preparing the Server for Development
For more information about {productName} installation, see the
link:installation-guide.html#GSING[
{productName} Installation Guide].
The following components are included in the full installation.
* JDK
* {productName} core
** Java Platform, Standard Edition (Java SE) 11
** Jakarta EE 10 compliant application server
** Administration Console
** `asadmin` utility
** Other development and deployment tools
** Open Message Queue software
** Apache http://db.apache.org/derby/manuals[Derby database]
** Load balancer plug-ins for web servers
The NetBeans Integrated Development Environment (IDE) bundles the
GlassFish edition of the {productName}, so information about this IDE
is provided as well.
After you have installed {productName}, you can further optimize the
server for development in these ways:
* Locate utility classes and libraries so they can be accessed by the
proper class loaders. For more information, see
link:class-loaders.html#beadj[Using the Common Class Loader].
* Set up debugging. For more information, see
link:debugging-apps.html#beafc[Debugging Applications].
* Configure the Virtual Machine for the Java platform (JVM software).
For more information, see "link:administration-guide/jvm.html#GSADG00007[
Administering the Virtual Machine for the Java Platform]"
in {productName} Administration Guide.
[[beaas]][[GSDVG00091]][[high-availability-features]]
=== High Availability Features
High availability features such as load balancing and session failover
are discussed in detail in the link:ha-administration-guide.html#GSHAG[{productName} High Availability Administration Guide]. This book describes the
following features in the following sections:
* For information about HTTP session persistence, see
link:webapps.html#beahe[Distributed Sessions and Persistence].
* For information about checkpointing of the stateful session bean
state, see link:ejb.html#beaib[Stateful Session Bean Failover].
* For information about failover and load balancing for Java clients,
see link:java-clients.html#beakt[Developing Java Clients].
* For information about load balancing for message-driven beans, see
link:jms.html#beaop[Load-Balanced Message Inflow].
[[beaat]][[GSDVG00092]][[development-tools]]
=== Development Tools
The following general tools are provided with the {productName}:
* link:#beaau[The `asadmin` Command]
* link:#beaav[The Administration Console]
The following development tools are provided with the {productName}
or downloadable from Oracle:
* link:#beaba[The Migration Tool]
* link:#beaaw[The NetBeans IDE]
The following third-party tools might also be useful:
* link:#beabb[Debugging Tools]
* link:#beabc[Profiling Tools]
[[beaau]][[GSDVG00333]][[the-asadmin-command]]
==== The `asadmin` Command
The `asadmin` command allows you to configure a local or remote server
and perform both administrative and development tasks at the command
line. For general information about `asadmin`, see the
link:reference-manual.html#GSRFM[{productName} Reference Manual].
The `asadmin` command is located in the as-install``/bin`` directory. Type
`asadmin help` for a list of subcommands.
[[beaav]][[GSDVG00334]][[the-administration-console]]
==== The Administration Console
The Administration Console lets you configure the server and perform
both administrative and development tasks using a web browser. For
general information about the Administration Console, click the Help
button in the Administration Console. This displays the {productName}
online help.
To access the Administration Console, type `http://`host`:4848` in your
browser. The host is the name of the machine on which the {productName} is running. By default, the host is `localhost`. For example:
[source]
----
http://localhost:4848
----
[[beaba]][[GSDVG00337]][[the-migration-tool]]
==== The Migration Tool
The Migration Tool converts and reassembles Jakarta EE applications and
modules developed on other application servers. This tool also generates
a report listing how many files are successfully and unsuccessfully
migrated, with reasons for migration failure. For more information and
to download the Migration Tool, see
`http://java.sun.com/j2ee/tools/migration/index.html`.
[[beaaw]][[GSDVG00338]][[the-netbeans-ide]]
==== The NetBeans IDE
The NetBeans IDE allows you to create, assemble, and debug code from a
single, easy-to-use interface. The GlassFish edition of the {productName} is bundled with the NetBeans 6.1 IDE. To download the NetBeans
IDE, see `http://www.netbeans.org`. This site also provides
documentation on how to use the NetBeans IDE with the bundled GlassFish
edition of the {productName}.
You can also use the {productName} with the Java Studio Enterprise
software, which is built on the NetBeans IDE. For more information, see
`http://developers.sun.com/jsenterprise/`.
[[beabb]][[GSDVG00340]][[debugging-tools]]
==== Debugging Tools
You can use several debugging tools with the {productName}. For more
information, see link:debugging-apps.html#beafc[Debugging Applications].
[[beabc]][[GSDVG00341]][[profiling-tools]]
==== Profiling Tools
You can use several profilers with the {productName}. For more
information, see link:debugging-apps.html#beafn[Profiling Tools].
[[beabf]][[GSDVG00093]][[sample-applications]]
=== Sample Applications
The samples are available from `https://github.com/eclipse-ee4j/glassfish-samples`.
Most {productName} samples have the following directory structure:
* The `docs` directory contains instructions for how to use the sample.
* The `pom.xml` file defines Maven targets for the sample.
* The `src/` directory contains source code for the sample.