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.

  2. Note: It is important to choose a source container; otherwise, the imported files will not be on the build path.
  3. From the workbench menu bar, select File > Import.
  4. In the Import wizard, select Zip file, then click Next.
  5. In the Zip file field, type or browse to select the file from which you would like to add the resources.
  6. In the import selection panes, use the following methods to select exactly the resources you want to add:
  7. In the Where Do You Want The Imported Resources To Go? 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).
  8. In the Options area, you can choose whether or not to overwrite existing resources without warning.
  9. 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:

    In the Where Do You Want The Imported Resources To Go? 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:
    Click Finish when you are done.
Related concepts
Java development tools (JDT)
Build classpath

Related tasks
Adding a JAR file as a library
Working with build paths

Related reference
Java Build Path
Package Explorer
 

Copyright IBM Corporation 2000, 2002. All Rights Reserved.