Saturday, April 4, 2009

[Eclipse] Eclipse HowTo

Introduction:

Eclipse is a integrated development environment for various popular programming languages, such as Java, C/C++, python and Perl etc.

Download:

Download the eclipse here

Best version for beginner: 3.4.2

(use the latest version at your own risk!)

Installation:

Unpack the archive to the location you want. Before running the eclipse, make sure you have had installed the java JDK in your system. If not, download and install it.

Download Java SDK here

Run Eclipse:

Click "Eclipse" to start it.

(your eclipse might have a little difference with mine.)

Create a Java Project:

Click "File->New->Project"

Select "Java Project"

Create a Java Class:

Click "File->New->Other..(or press Ctrl+N)"

Select "Class" and click "Next" to continue.

given a name for new class and click "Finish" to finish to create the new class.

Coding:

Follow are the simple code for displaying the "Hello Java" message in console.

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

Compile and Run:

Right-Click your source code "Hello.java", select "Run As -> Java Application".

you probably can see the output message in your console panel.

You can visit eclipse's official website for more detail information.

http://www.eclipse.org

0 意見:

Post a Comment