Home » Java: Create a new Java Project on Eclipse

Java: Create a new Java Project on Eclipse

by Pring
Java: Create a new Java Project on Eclipse

I. Introduction.

This tutorial will teaches you how to Create a new Java Project on Eclipse. Eclipse is one of the most popular development environments for Java language. Creating a new Java project in Eclipse is fairly straightforward. Before you can start working on you new Java project, you will need to create it first. Let’s start.

II. Create a new Java Project on Eclipse step by step.

To create a new Java Project on Eclipse. Follow these steps:

Step 1. Download Eclipse tool.
Step 2. How to use Eclipse tool.
Step 3. Create a new Java Project.
Step 4. Create a first Java Application.
Step 5. Run a Java Application.

You can see details of Video on create a new Java Project on Eclipse as below.
[Sorry, the video we will update later]

Or you also can see details as below.

Step 1. Download Eclipse tool.

You can access to eclipse home page to download eclipse tool.
Java: Create a new Java Project on Eclipse

Or, if you want select other version eclipse package.
Java: Create a new Java Project on Eclipse

Step 2. How to use Eclipse tool.

1. Extract Zip file.
After the download is complete, you need to extract the zip file.
Java: Create a new Java Project on Eclipse

The result after extracting is the eclipse directory.
Java: Create a new Java Project on Eclipse

2. Java JDK check.
Because to run an eclipse tool, your system must install Java JDK. So first, you check the Java version with the following command:

java -version

Sample Output:

C:\Users\Administrator>java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

In the case, your system not install Java JDK, You can see the following article: How to install JDK and set JAVA_HOME on Windows

3. Open Eclipse tool.
At Eclipse folder, double click into [ eclipse.exe ]
Java: Create a new Java Project on Eclipse

Next, you need to select the Workspace location. About Workspace concept: In eclipse, you have to store your source in a project directory. A workspace is nothing more than a collection of projects. You can have more than one workspace.

You can change workspace directory then click [ Launch ] button.
Java: Create a new Java Project on Eclipse

Ok, you can see the eclipse tool has started.
Java: Create a new Java Project on Eclipse

Step 3. Create a new Java Project.

1. At menu, click [ File    >>    New    >>    Project… ]
Or you can use the following key on your keyboard: [ Ctrl + N ]
Java: Create a new Java Project on Eclipse

2. At Wizards, Enter [ Java Project ] keyword.
Java: Create a new Java Project on Eclipse

3. Enter Project name, Select Java JDK or JRE version.
Java: Create a new Java Project on Eclipse

4. Create Java project finish.
Java: Create a new Java Project on Eclipse

If [ Open Associated Perpective ] dialog is displayed. Click Open [ Perspective ] or [ No ] button.
Java: Create a new Java Project on Eclipse

Ok, you’ve created a successful Java Project.

Step 4. Create a first Java Application.

At the [src] folder, right-click on it, click [ New    >>    Class ]
Java: Create a new Java Project on Eclipse

Enter the Class name then click [ Finish ] button.

Java: Create a new Java Project on Eclipse

Enter the your first code:

public static void main(String[] args) {
    System.out.println("Hello world!");
}

Sample:
Java: Create a new Java Project on Eclipse

Step 5. Run a Java Application.

1. Right-click on the Class name.
2. Select Run As.
3. Select Java Application.
4. Select Console tab.
Java: Create a new Java Project on Eclipse

III. Conclusion.

In this tutorial, we was Create a new Java Project on Eclipse. If you hit a problem or have feedback, leave a comment below.


Create a new Java Project on Eclipse is complete. Wish you success and luck.
Thanks and best regards!
— Pring —

Related Articles

3 comments

vurtilopmer December 9, 2019 - 9:49 pm

Whats up very cool website!! Man .. Excellent .. Amazing .. I’ll bookmark your blog and take the feeds additionally…I am happy to search out so many helpful info here in the submit, we want develop more techniques on this regard, thanks for sharing. . . . . .

Reply
tunv15 February 27, 2021 - 4:48 am

chuyên gia cấp tập đoàn

Reply
erotik March 1, 2021 - 6:24 pm

You genuinely have a method with words. You made it easy to understand a subject that I was a little overwhelmed about. The info you have provided on a single blog post is more than others have actually supplied in a whole internet site. I just wished to thank for giving such useful content! Darb Flinn Malvie

Reply

Leave a Comment