Creating a Java project with source folders
For larger projects, create a project with source folders.Note: When using source folders, non-Java resources are copied to the output folder by the Java builder. If you have non-Java resources (documentation, for example) that should not be copied into the output folder, you can create an ordinary folder and store the resources there. You can also use the preferences page Window > Preferences > Java > Compiler > Build Path to specify a list of resources that will not be automatically copied to the output folder.
- From the main workbench window, click File > New > Project. The New Project wizard opens.
- Select Java from the left pane and Java Project from the right pane, then click Next. The New Java Project wizard opens.
- In the Project name field, type a name for your new Java project.
- Check or clear the Use default check box to indicate whether you want to use the default location for your new project. If you clear this check box, then type a path or click Browse to select a location for the project. Click Next. The Java Settings Page opens.
- On the Source tab, click the Add Folder button. The Source Folder Selection dialog opens.
- Click the Create New Folder button to create new source folder. You can also create new source folders at any time later.
- Select the newly created folders in the Source Folder Selection and press OK
- Optionally, replace the default name in the Default output folder field to use a different name for the output folder.
- On the Projects tab, select the required projects to be on the build path for this project.
- On the Libraries tab, select JAR files and CLASS file containers to add to the build path for this new project and attach source to the JAR files.
- On the Order and Export tab, use the Up and Down buttons to move the selected JAR file or CLASS file container up or down in the build path order for this new project.
- Click Finish when you are done.
Note: When you are using CVS as your repository, it is recommended that you create a .cvsignore file inside the project. In this file, add a line with the name of the output folder ("bin" for example). Adding the output folder in the .cvsignore file ensures that the CVS versioning support ignores the output folder in versioning operations.
Creating Java elements
Creating a new Java project
Creating a new source folder
Creating a Java project as its own source container
Creating a new Java package
Creating a new Java class
Creating a Java scrapbook page
Working with build paths