How to Use NetBeans
    Main Page
    Lab Hardware
    Lab Software
 

In the instructions below, substitute your UW Net ID wherever you see "uwnetid".

Last updated: 21 Sep 2012

NetBeans

NetBeans is an Integrated Development Environment (IDE) written in Java that supports development of Java programs, web services and enterprise beans, as well as other languages.

How to Configure NetBeans for Use

NetBeans includes web application servers such as GlassFish to run web applications and services. Setting these up so that they can run in a lab environment such that any computer can be used and your development environment roams with you takes some effort on the part of lab staff. We have tried to minimize the impact on you by writing scripts and pre-defining configuration directories and passwords.

We put all configuration information in a directory on your home drive called H:\.netbeans. You should store all of your projects on the H: drive.

Desktop and Start Menu folders called "ADC Lab" or "GenDev Labs" hold program folders for the wide variety of applications installed on lab workstations, of which NetBeans is one. It has its own folder, and in it you will find two shortcuts:

Setting Up GlassFish

The Setup Glassfish Once shortcut needs to be run only once -- it invokes a script that creates what GlassFish calls a "personal domain" in your home directory (specifically, in a directory called H:\.netbeans\.gf_domains). GlassFish uses these domains to store configuration information, log files, and the web applications you create. That directory holds all GlassFish domains, and its name is shown when the script completes. The actual domain name is personalDomain, and it is the name of a subdirectory within H:\.netbeans\.gf_domains.

Starting NetBeans

Clicking on the NetBeans IDE 6.5 shortcut will start the NetBeans IDE. Due to where NetBeans records information, you will see these errors at startup:

  • java.lang.NullPointerException

    This is a problem with the auto-updater trying to run and write its files to a write-protected directory.

    Click on the Cancel button as many times as is needed (it may take a while to respond).

  • Register NetBeans

    Click on the Never Register button -- though it will ask you this every time you start NetBeans because it attempts to store your answer in a write-protected directory.

Naming a Project

When you create a project, you MUST use the H:\ drive path vs. the Universal Naming Convention (UNC) path, or the web application will fail to deploy. For example, if your UW Net ID is "test0003", you would use

H:\NetBeansProjects

vs.

\\itfiles3\test0003$\NetBeansProjects

While they are one and the same folder to Windows, some Java applications (e.g., ant) may see them as different due to the different paths.

Deploying to Local GlassFish Server

In NetBeans, when you deploy a web application and "GlassFish V3 Prelude" is its server, a local GlassFish server is started by the deployment process and will eventually prompt you for a username and password. The username is "admin", and the password can be found in H:\.netbeans\.gf_pw. This allows the NetBeans IDE to manage the server applications.

Change Log

12 Mar 2009 Explained how to handle startup errors; minor editorial changes
10 Mar 2009 Original document



Hours  |  Support Information  |  News  | 
Policies  |  Emergencies