Mounting file systems in NetBeans 3.x

In order to work on a file in NetBeans, it is necessary to inform NetBeans of the location of the files. This process in known as Mounting a File System. NetBeans will only allow access to files from directories that have been mounted.

  1. From the File menu, select Mount File System.
  2. Select Local Directory and then select Next
  3. Browse to the directory that contains the files that you want to access. Do not open the directory, just highlight its name.
  4. Select Finish. If Finish is disabled, then it means that the name that is highlighted is not a directory, or that the directory is already mounted.

Adding servlet.jar to the CLASSPATH in NetBeans 3.x

It is not necessary to add servlet.jar to the CLASSPATH in NetBeans because NetBeans has its own copy of Tomcat as part of its installation. If you want to add a more recent servlet.jar than the one that came with Tomcat, then do the following.

  1. Only do this if you are unhappy with the servlet.jar that is packaged with NetBeans.
  2. Mount the servlet.jar file. This is like mounting a file system, but in step 2 above, choose Archive Files instead of Local Directory.
  3. All mounted file systems are included in the CLASSPATH. However, in order for the newer servlet.jar to be used in place of the one that comes with NetBeans, it is necessary to change the order of the file systems.
    1. Right-click on the Filesystems icon in the Explorer window.
    2. Click on Change Order
    3. Move the newly mounted servlet.jar to the top of the list.

Deploying .class files to a different directory in NetBeans 3.x

By default, NetBeans will create the .class file in the same directory as the .java file. If you want to change this, then do the following.

  1. Mount the web application that contains the class directory where you would like to place the .class files. It is not necessary to mount the class directory, just mount the directory for the web application. This is the directory that will contain the WEB-INF subdirectory. NetBeans will automatically mount the class directory of any web application that is mounted.
  2. Select the Tools menu.
  3. Select the Options menu.
  4. Open the Building folder.
  5. Open the Compiler Types folder.
  6. Select External Compilation
  7. In the right hand pane, click on Target.
  8. Click the drop down arrow for the Target location.
  9. Select the classes directory for the web application that you are using.