Adding source code as individual files
From a ZIP or JAR file
- 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.
- From the workbench menu bar, select File > Import.
- In the Import wizard, select Zip file, then click Next.
- 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.
- 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).
- In the Options area, you can choose whether or not to overwrite existing resources without warning.
- Click Finish when you are done.
From a directory
- 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.
- From the workbench menu bar, select File > Import.
- In the import wizard, select File System, then click Next.
- In the Directory field, type or browse to select the directories 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.
- 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).
- 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
- Click Finish when you are done.
Java development tools (JDT)
Build classpath
Adding a JAR file as a library
Working with build paths