Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Developer's Guide

- Previous: The Java Debugger
- Next: Sun Java System Message Queue Debugging

## To use the NetBeans 3.6 IDE with the Application Server

1. Download the latest version of NetBeans from `http://www.netbeans.org`.

2. Set up the classpath in NetBeans to compile J2EE applications using the standard J2EE 1.4 API libraries provided with the Application Server.

   Perform the following steps in the NetBeans IDE:

   1. In the Menu bar, click on the File menu and select Mount Filesystem.

   2. In the wizard dialog box, select Archive Files as the Filesystem type and click Next.

   3. Navigate the file chooser to the Application Server directory install-dir`/lib`.

   4. Select `j2ee.jar`. To use Sun-specific public APIs provided in the Application Server, select the `appserv-ext.jar` archive as well. Click Finish.

      The `j2ee.jar` file should appear in the list of mounted file systems under the Editing pane inside the Filesystems tab of the NetBeans IDE. You can now import J2EE 1.4 API packages in your source files and compile the source files.

3. Build your application in the NetBeans IDE.

4. Assemble your application into a J2EE archive file (WAR, JAR, RAR or EAR file) and deploy it to the Application Server.

5. Start the Application Server with debugging enabled. See Enabling Debugging.

6. Attach to the Application Server using the NetBeans IDE debugger:

   1. Click on the Debug menu, select Start Session, then select Attach.

   2. In the Attach dialog box, make sure the host (default `localhost`) and port (default `9009`) correspond to the host and JPDA debug port of the Application Server. Click OK.

      The Output Window of the Debugger Console should display the message `Connection established`.

7. Set break points in your source file in the NetBeans IDE as usual, and run the application.

8. When finished with debugging, detach from the server by clicking Finish in the Debug menu.

- Previous: The Java Debugger
- Next: Sun Java System Message Queue Debugging

- © 2010, Oracle Corporation and/or its affiliates