13
Go to the File menu and select New ➤ Java Project,
as shown in Figure
1-9
.
Figure 1-9. Selecting Java project
The dialog is shown in Figure
1-10
.
ChApteR 1 GettInG StARted wIth JAvA 17
14
Figure 1-10. Creating a new Java project
Name your project
java17Recipes. Enter the project name
in the text box at the top
of the dialog, as shown in Figure
1-10
.
In the JRE section, select the installed JDK (i.e., the JavaSE-17 that you just
configured). Press Finish to complete the wizard and create a skeleton project.
Tip Java is case-sensitive. Moreover, by
convention, project names should start
with a lowercase letter.
Now, create a new package. Go to the File menu and select New ➤ Package, as
shown in Figure
1-11
.
ChApteR 1 GettInG StARted wIth JAvA 17
15
Figure 1-11. Creating a new package in Eclipse IDE
Name the package org.java17recipes.chapter01.recipe01_05 as shown in Figure
1-12
.
Tip By convention, package names usually start with a lowercase letter.
Next, create a new class. Go to the File menu, select New ➤ Class,
and name the class
HelloWorld, as shown in Figure
1-13
.
Do'stlaringiz bilan baham: