# Adding source code as individual files

## From a ZIP or JAR file

1. In the Navigator or Package Explorer, you can optionally select the source folder into which you wish to import the source. Note: It is important to choose a source container; otherwise, the imported files will not be on the build path.
2. From the workbench menu bar, select File > Import.
3. In the Import wizard, select Zip file, then click Next.
4. In the Zip file field, type or browse to select the file from which you would like to add the resources. In the import selection panes, use the following methods to select exactly the resources you want to add:
   - Expand the hierarchies in the left pane and check or clear the boxes representing the containers in the selected directory. Then in the right pane, select or clear boxes for individual files.
   - Click Select Types to select specific file types to add.
   - Click Select All to select all files in the directory, then go through and deselect the ones that you don't want to add.
   - Click Deselect All to deselect all files in the directory, then go through and choose individual files to add.
5. In the Select the destination for imported resources field, type or browse to select a workbench container for the added resources (if it was not already selected when you activated the Import command).
6. In the Options area, you can choose whether or not to overwrite existing resources without warning.
7. Click Finish when you are done.

## From a directory

1. In the Navigator or Package Explorer, select the source folder into which you wish to import the source. Note: It is important to choose a source container; otherwise, the imported files will not be on the build path.
2. From the workbench menu bar, select File > Import.
3. In the import wizard, select File System, then click Next.
4. In the Directory field, type or browse to select the directories from which you would like to add the resources.
5. In the import selection panes, use the following methods to select exactly the resources you want to add:
   - Expand the hierarchies in the left pane and check or clear the boxes representing the containers in the selected directory. Then in the right pane, select or clear boxes for individual files.
   - Click Select Types to select specific file types to add.
   - Click Select All to select all files in the directory, then go through and deselect the ones that you don't want to add.
   - Click Deselect All to deselect all files in the directory, then go through and choose individual files to add.
6. In the Select the destination for imported resources field, type or browse to select a workbench container for the added resources (if it was not already selected when you activated the Import command).
7. In the Options area, you can choose whether you want to:

- overwrite existing resources without warning
- create a complete file structure for the imported files

8. Click Finish when you are done.

Java development tools (JDT)
Build classpath

Adding a JAR file as a library

Java Build Path
Package Explorer