In this tutorial, I will show you how to integrate a local Glassfish installation into Eclipse 3.6 (Helios). Before we start, I assume you've installed: Eclipse 3.6, the Java RE, the Java JDK, and the Java EE SDK. Install Java RE and JDK first, before you install the Java SDK.
The first step is to start up Eclipse and locate the servers tab, which is found at the bottom of the screen for default installations.
Now, right-click somewhere in the tab, select "new", and then "server". The following screen will pop up, with the default server adapters.
The server adapter for Glassfish is not included by default. So we have to click "Download additional server adapters" to download the server adapter for Glassfish. A screen will pop up with a selection of server adapters. Select "Oracle Glassfish Server Tools", which is the adapter we're looking for.
Click "next" to download and install the server adapter. Restart Eclipse, when the installation is finished. After the restart, the Glassfish server adapter will show up in the list from the servers tab.
Select it, and click next. The next screen lets you configure the server adapter. Select a working JRE environment and select the installation path of your Glassfish application server.
Click next to go to the next screen. If you have set an administrator password during the installation of Glassfish, you have to fill in this password in the form. Otherwise, use the default values and click next to proceed.
The next screen lets you select existing projects to be added to the newly configured server adapter. The screen is empty in this tutorial, because we're using a fresh install.
When the configuration is succesful, you'll see the server adapter in the servers tab. Now, you can start using it by right-clicking on the server.
From this menu, you can:
- start/stop the server
- add/remove new projects
- publish/unpublish projects
- view the administration console
- update Glassfish
Have fun playing with Glassfish in Eclipse!