Creating a Java project as its own source container
For simple projects, the project itself acts as the source container.
- 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.
- Select 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 or click Browse to select a location for the project.
- Click Next. The Java Settings Page opens.
- On the Source tab, check that the project is the only source folder and the default output folder.
- Optionally, on the Projects tab, select the required projects to be on the build path for this project. Use these options only if your project depends on other projects.
- Optionally, on the Libraries tab, select JAR files and CLASS folders to add to the build path for this new project and attach source to the JAR files. Use these options only if your project requires additional libraries.
- On the Order and Export tab, use the Up and Down buttons to move the selected JAR file or CLASS folders up or down in the build path order for this new project.
- Click Finish when you are done.
Creating Java elements
Creating a new Java project
Creating a Java project with source folders
Creating a new Java package
Creating a new Java class
Creating a new interface in a compilation unit
Working with build paths