When you add a new folder to your project, a corresponding folder is created on the hard disk. In a Java project, a folder is essentially a Java package. In Project Explorer's directory view, all packages are displayed as project subfolders. In package view, subfolders are displayed as Java packages. For more information about views, see Choosing the Project View.
Note A folder may reside in the project directory structure without belonging to the project. For example, removing a folder from the project still leaves the folder in the project directory structure. This folder can be added back to the project in its same location on the disk.
To add a new folder (package) to the project
Once you have created a folder, you can add files to it. For information about adding files, see Adding a File.
Note If a folder is added to the project directory structure through the file system, it is automatically added to the project and displayed in Project Explorer. All files in the folder, whose types are specified in the project filter, are added to the project as well. For more information about the project filter, see Displaying All Files in the Project Directory Structure.
If a folder does not belong to the project, but it already exists in the project directory structure, you can simply add it to the project in that same location.
To add a folder that already resides in the project directory structure
For more information about the project filter and about nonproject items that reside in the project directory structure, see Displaying All Files in the Project Directory Structure.