Configuring a Java Source Folder

Creating a separate source folder allows you to separate Java source files from other files in a project.

By default, Java source files are created in the src folder at the root of the project. You can add multiple source folders.

  1. In the Workspace Navigator, right-click the project and select Properties.
  2. Select the Java Build Path page.
    Note: If this page is not available in the project properties, click Cancel, then verify the project has the Java nature.
  3. Select the Source tab.
  4. To:
    Option Action
    Create a new folder Click Create New Folder and enter a folder name.

    The Java builder creates the folder when you rebuild the project.

    Specify an existing folder in the project Click the box next to the folder name.

    The Java builder compiles the Java source files in the package tree under the source folder when you rebuild the project.

  5. Click OK.
  6. Do the following, as necessary:
    • If you added source folders that contain existing source files, check for compile or build errors in the Problems view.

      Configure the Java library search path to correct build errors.

    • If prompted to verify removal of the project root as a source folder, click OK.
    • If prompted to perform a full rebuild of the project, click OK.
Related tasks
Creating a Java Project
Configuring the Java Project Nature
Configuring the Java Library Search Path
Configuring Java Builder Resource Filters
Importing Java Source Files

For product-related issues, contact Sybase Technical Support at 1-800-8SYBASE. Send your feedback on this help topic directly to Sybase Technical Publications: pubs@sybase.com