Importing Java Source Files

You can import Java source files to a Java project or another project that has the Java nature. As with most Java compilers and IDEs, Java source files must be organized in a package tree under a source directory.

To import Java source files:

  1. Make sure you are using a Java project or another project that has the Java nature.

  2. If you have not done so already, configure source folders for the project.

  3. Using a file system explorer window such as Windows Explorer or a Linux graphical shell, copy and paste or drag and drop the source files into your project using one of these techniques:

    • To add source files to an existing project source folder, select the top-level directory in the package tree, and copy and paste or drag and drop it to the project source folder.

    • To copy an external source folder into your project and as a new Java source folder:

      1. Select the external source folder, that is, the parent directory of the package tree, and copy and paste or drag and drop it to the root of your project.

      2. Configure source folders and add the new folder as a source folder.

Using the import wizard

You can also import source files using the Eclipse import wizard.

Configuring Java Source Folders

Configuring the Java Library Search Path

Configuring Java Builder Resource Filters

Creating a Java Project

Configuring the Java Project Nature

Java Development User's Guide

Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com