1.5. Creating a Java Project
Problem
You want to start programming some Java. Where do you start?
Solution
Select File→ New→ Project.
Discussion
In Eclipse, all code—Java or otherwise—has to go into a
project, and creating Eclipse projects is a
basic skill. Projects organize
your
files, classes, libraries, and exports. Over the next few recipes,
we’re going to create a Java project that will use
the code you see in Example 1-1 to display some
simple text, “Stay cool.”
Tip
Creating a Java project is a basic skill, and this chapter is all about basic skills. However, there’s much more that we don’t have space for here. For additional details on creating Java projects, see Chapter 3 and Chapter 4.
Example 1-1. The FirstApp.java example
public class FirstApp
{
public static void main(String[] args)
{
System.out.println("Stay cool.");
}
}To get started, create a new Java project by selecting File→ New→ Project in Eclipse, and then open the New Project dialog, shown in Figure 1-5.

Figure 1-5. The New Project dialog
We want to create a Java project, so select Java
in the left pane and Java
Project in the right pane. Click Next, and in the
next dialog name the project FirstApp, as shown in
Figure 1-6.

Figure 1-6. Naming a project
Click Finish to finish creating the project. (If you click Next, additional ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access