Set up a Java project in Eclipse

From Knowledge Kitchen
Jump to navigation Jump to search

Here are explicit instructions for how to set up an Eclipse project and add a file. Generally, you should have one project for each assignment in this course. Some assignments may have many files.

Create a new Java project

Click the File -> New -> Java Project to create a new Java Project.

Create a new Eclipse Java project

Project settings

Give the project a meaningful name; select the Java SE 1.8 execution environment;

Project settings

Create a Java class file

Every file is called a java class. make as many of these as you need files.

Enter a package name that follows the following pattern, where you replace 'fb1258' with your own unique ID, and replace 'project_name' with the name of your own project.


Enter an upper camel case class file name, with no spaces or special characters.

If this project contains only one file, or this is the main file in a multi-file project, select the check box to create the main method.

Create a new class file

Compile and execute

Compile and execute the program by clicking the run button.

Compile and execute