When you remove a file from your Java project, the file is no longer built with the project; however, the file still remains in the project directory structure on the hard disk. When you remove a folder, the folder and all of its files are removed from the project, but they are still left on the hard disk.
You can also choose to actually delete the file or folder from both the project and the hard disk.
Note Removing or deleting a .java file does not automatically remove or delete the associated .class file (if it exists). However, you can display the .class file in Project Explorer and then manually remove or delete it.
To remove a file or folder from the project
To delete a file or folder from the project and the hard disk
Note If an item is deleted through the file system, it is automatically deleted from the project and removed from Project Explorer.
Project Explorer provides the option of displaying the items you have removed from your project. For more information, see Displaying All Files in the Project Directory Structure. For information about adding a removed file or folder back to the project, see Adding a File and Adding a Folder, respectively.