DZone
Java Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Java Zone > Using GlassFish from Eclipse

Using GlassFish from Eclipse

David Salter user avatar by
David Salter
·
Dec. 22, 11 · Java Zone · Interview
Like (0)
Save
Tweet
32.59K Views

Join the DZone community and get the full member experience.

Join For Free

When I think of developing apps using GlassFish, I usually think of using NetBeans for the development. As you'd expect however, Oracle provides some good tooling to allow you to develop against GlassFish from within Eclipse - even to the point of installing the application server directly from within Eclipse.  So, how is this done?

Installing GlassFish Server Tools

Contrary to what you'd expect, to install GlassFish tooling, you don't use the Eclipse Marketplace for installation.  To install, right click within the "Servers" pane and select "New | Server" to display the "Define a New Server" dialog. On this dialog, select "Download additional server adaptors" and in the resulting dialog select "Oracle GlassFish Server Tools".


After accepting the licence conditions, the GlassFish Server tools will be downloaded upon which you'll need to restart Eclipse to complete the installation.

Defining a GlassFish Instance

After a restart, opening the "Define a New Server" dialog will show that GlassFish support has been added.


Choose the GlassFish server you wish to use and press the "Next" button.  On the resulting dialog, you can choose to locate an existing copy of GlassFish, or install an new instance via the "Install Server" button if you don't already have GlassFish installed.


One point to note here is that, if you install a new instance of GlassFish, you may then need to browse through the install folder to locate the "glassfish" folder within.  You will see that this is necessary because the "Next>" button will be disabled as you've installed an instance of GlassFish, but not correctly identified its location to Eclipse.

When you've selected (and installed if necessary) a GlassFish instance, complete the wizard to define the admninistrator credentials of the server.

GlassFish Tools

After creating a GlassFish server instance in Eclipse, you can develop and test Java EE 6 applications against it.  The GlassFish tools provides additional support to assist in this.  For example, right clicking on the server in the "Servers" tab allows you to manage the server or get additional information or support.


New wizards are also installed into Eclipse to assist when creating GlassFish facets such as JMS or JDBC resources as shown below.  These wizards are available on the standard "File | New | Other" dialog under the "GlassFish" folder.

 

From http://www.davidsalter.com/2011/12/using-glassfish-from-eclipse.html

GlassFish Eclipse

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How to Build Microservices With Node.js
  • Anatomy of a Webhook HTTP Request
  • Remote Debugging and Developer Observability
  • Build a Data Pipeline on AWS With Kafka, Kafka Connect, and DynamoDB

Comments

Java Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo