Accessing Directories and Files 

 NetBeans IDE 3.6 


To access a source directory in the IDE, you have to mount it in the Filesystems window. Mounting a directory in the Filesystems window adds the directory's contents to the IDE's Java classpath.

To mount a directory in the IDE:

  1. Choose File > Mount Filesystem.
  2. Select the Local Directory node. Click Next.
  3. Select the directory you want to mount. Click Finish.

If you are mounting a directory that already contains Java source code, you must mount the directory at the Java package root. For example, if you have a Java class com.myapp.MyApp.java in the following directory structure:

MyFunApp
    app
        com
            myapp 
                MyApp.java
    lib
        com
            mylib
                MyLib.java

Here app is the package root for com.myapp.MyApp.java, so you must mount the app directory. If you mount the directory at the wrong point, your files will not parse correctly and display errors in the Source Editor. If you want to add MyLib.java to the IDE classpath, you have to mount the lib directory separately.

If your source depends on any Java libraries, mount the libraries as well using by choosing File > Mount Filesystem and selecting Archive Files in the wizard.

For a more detailed explanation of managing source directories and the Java classpath, see Using NetBeans IDE - Setting Up Your Project.