Get Started Quickly


Introduction.

This page gives a short overview on how to get started quickly with GlassFish 4. For more details, we advise you to check the Quick Start Guide from the GlassFish Documentation.

Make sure JDK 7 is installed.

Java EE 7 requires JDK 7 as it make use of some of the latest Java SE 7 features (e.g. JMS 2 uses Java 7 auto-closeable interfaces).
To check if you have JDK 7 installed (full JDK, not just JRE), type javac -version in a shell/command box.

For GlassFish 4, Oracle recommend to use JDK 7 Build 21 (or above) which can be downloaded here.


Download GlassFish.

You can download GlassFish from the download page.
There are 2 types of installers : Zip and Native Installers. The Zip installer works on any supported platforms while a Native installer is, as its name implies, specific to a plaform.
The Zip installer is the most simple one, it contains a preconfigured, ready-to-run, GlassFish instance while the Native installer offers a Graphical wizzard that allows you to cusomize the GlassFish installation.

If you are not sure which distributions to use, just start with GlassFish 4 - Full Platform Zip.


Install GlassFish.

For the Zip installer, just extract the Zip in the directory where want to have GlassFish installed unzip glassfish-4.0.zip.

For the Native installer, just launch it and follow the graphical wizzard. Please do note that, on Unix platforms, the Native installer is not executable by default so make sure to launch it as a parameter of a shell process sh glassfish-4.0-unix.sh.

By default, GlassFish is configured with one domain called "domain1" which uses port 8080 for HTTP, port 8181 for HTTPS and port 4848 for Adminsitration.


Start GlassFish.

Just invoke, from the glassfish directory, the glassfish4/bin/asadmin start-domain command. Note that since, you only have one domain configured, there is no need to mention which domain to start.

To stop GlassFish, you can use the glassfish4/bin/asadmin stop-domain domain1 command.


Get and install an IDE.

GlassFish 4 is supported by the major IDE's that are available on the market. Some IDE's such as NetBeans and Eclipse also have Java EE 7 support today, others should follow shortly. The IDE page gives on overview of the dirrent IDE's that you can use with GlassFish 4.


Get acquainted with the new capabilities of Java EE 7.

If you are new to Java EE, you might want to check Your First Cup: An Introduction to the Java EE Platform, a short tutorial designed to give you a hands-on lesson on developing an enterprise application from initial coding to deployment.

To learn more about the new Java EE 7 capabilites, read the Java EE 7 Tutorial.


Check the documentation.

The documentation page contains all the manuals that explain how to develop and deploy applications on GlassFish, how to manage GlassFish, etc. This page also contains other additional useful asests.


Need help?

Just visit the Forum page, it contains the more relevant places where you can post technical questions.


Secure your GlassFish installation!

GlassFish is, out of the box, configured to be as developer friendly as possible. For example, the Admin Console is not protected by default to ease the life of developers. When you are putting GlassFish 4 online, you should obviously secure your GlassFish environment! Make sure to check the Security Guide.