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.

  1. Ensure you are using a Java project or a project with 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:
    Option Action
    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 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.
    Note: You can also import source files using the Import wizard.
Related tasks
Configuring a Java Source Folder
Configuring the Java Library Search Path
Configuring the Java Project Nature

Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com

Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.