NetBeans Standard and Full editions contain "out of the box" support for GlassFish. When installing one of these editions of NetBeans, GlassFish is also installed. NetBeans can be downloaded from http://www.netbeans.org.
NetBeans has several project categories; Java EE applications can be created from the Web and Enterprise categories.
For most project types in the Enterprise or Web categories, NetBeans requires us to select an application server where the project will be deployed. GlassFish is labeled Sun Java System Application 9 in the drop-down box used to select a server.
Once we create the project and we are ready to deploy it, we simply need to right-click on the project and select Deploy Project from the resulting pop-up menu.
The project will be automatically built, packaged, and deployed. For web applications, we also get the Run Project and Debug Project options. Both of these options, in addition to building, packaging, and deploying the project, automatically open a new browser window and point it to the application's URL. When we select Debug Project, GlassFish will be started in debug mode, if necessary, and we can use the NetBeans debugger to debug our project.