Setting up Eclipse: Java’s popular IDE

Summary
This tutorial will help you to install JDK (Java Development Kit), setup Eclipse IDE (Integrated development environment) and get started with Java.

Keywords: IDE, Eclipse, JDK

Downloads
First of all you have to download some stuff from the Internet:

Download the latest JDK from: http://java.sun.com/javase/downloads/index.jsp
Download Eclipse IDE for Java Developers from: http://www.eclipse.org/downloads/
Installation
Run JDK installer and follow instructions. After you installed the JDK, unpack eclipse archive somewhere on a disk and run eclipse.exe.

Get started with Eclipse
Select a workspace
If you did previous steps right, you should see the following:

Select a workspace
You are asked to select a workspace directory, where all of your further projects would be stored. You may leave the default folder or choose another one. It’s important to remember this path for future.

After you choose the workspace location, press ok and wait a little, while Eclipse is loading.
Creating a project
Choose File → New → Java Project from menu. In the “New Java Project” window type “HelloWorld” in the project name edit box. Then press Finish button.

Create a Java Project
Click with the right button on the HelloWorld project in package explorer. Choose New → Class:

New Class
Name it “HelloWorld” and set checker box to create main method stub. Then press Finish button.

Create HelloWorld class
Type:

System.out.println(“Hello World! I am new to Java.”);

in the main method’s body and run HelloWorld with run button:

Run HelloWorld application
You will see the result in a console window:

Console window
Your first Java application is ready! We will discuss it in detail in the next article.

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注