HomeJava

Java for Testers – Creating a Java Project in Eclipse IDE

Java for Testers – Creating a Java Project in Eclipse IDE

<<Previous Post                    << Complete Tutorial>>                        Next Post>>

In the previous article, I have explained ‘Installing and Launching Eclipse IDE‘.

In this article, I will practically explain ‘Creating a Java Project in Eclipse IDE’

Before moving ahead, make sure the below are available in your machine:

Let’s get started

Java for Testers – Creating a Java Project in Eclipse IDE

Follow the below steps for creating a Java Project in Eclipse IDE:

1) Open Eclipse IDE and select File > New > Project as shown below:

Creating a Java Project - File

2) In the displayed ‘New Project’ dialog, expand ‘Java’, select ‘Java Project’ and click on ‘Next’ button as shown below:

Creating a Java Project - Java Project

3) In the displayed ‘New Java Project’ dialog, enter any name say ‘FirstProject’ and click on ‘Finish’ button as shown below:

Creating a Java Project - Finish

4) Observe that a Project with name ‘FirstProject’ got created and displayed as shown below:

Creating a Java Project - First Project

5) Expand the above Project, right-click on ‘src’ and select ‘New’ > ‘Class’ as shown below:

Creating a Java Project - New Class

6) In the displayed ‘New Class’ dialog, give any name say ‘Demo’, select ‘public static void main(String[] args)’ checkbox option  and click on ‘Finish’ button as shown below:

Creating a Java Project - Demo

 

7) Observe a class file having ‘Demo’ name got created with some default code as shown below:

Note: Don’t worry if you are new to Java and don’t understand any of the auto-generated Java code here. I will explain each and every element in the code when required.

Creating a Java Project - Default Code

8) Let’s write a sample Java statement which prints the given text as shown below:

Note: I will explain print statements in detail in the upcoming article. Till then blindly follow my explanation with the intention of executing the code at the Project level.

Creating a Java Project - print statement

9) Save the Project and click on ‘Run’ button as shown below:

Creating a Java Project - Save and Run

10) Observe that the Program got executed and ‘Hello World!’ text inside the print statement got printed as output in the Console tab as shown below:

Creating a Java Project - Output

Here concludes the practical demonstration of creating and executing a Java project in Eclipse IDE.

In the next article, I will start explaining each and every element of the above Java code in the Project.

Next Steps:

  • > To learn more about Java, continue to the next post (Click on Next Post link below)
  • > Check complete Java Tutorial Contents here (Click here)

Please leave your questions/comments/feedback below:

Happy Learning 🙂

Arun Motoori (www.QAFox.com)

On a mission to help the Testing Community in all possible ways.

<<Previous Post                    << Complete Tutorial>>                        Next Post>>

If you like this article, share it on LinkedIn using the below button:

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *