). Set up a working space
Open the first interface that appears Eclipse.exe:
To set up a workspace, we place the workspace directory in D and click "OK".
2). Click on the "Workbench" link in the upper right corner of the workspace to enter the Workbench
Open the Workbench interface
3). Create a Java project
Click File--new--project
The page that pops up is selected "Java Project"
Project name fills in your project name, other options take the default value, click "Finish".
The workbench on the left shows the works that have been built.
4). New Package
Right-click on the "src" package in the project and select "New"-"packages"
There is no special requirement for the package name, which is mainly the specification stipulated in the development.
Here we use the name of this blog: blog.csdn.net.unix21
Click "Finish" to finish.
In the SRC directory, we have just created our new package. It's actually a folder.
For example, the package name blog.csdn.net.unix21, in fact, in the SRC directory to create a folder blog, and in other order to create another folder:
5). New Class
Right-click the package that you just created, New--class, and create a new class.
Fill in the class name, tick the check box (public static void main (string[] args), is to automatically generate the main method, click "Finish" to complete.
The class file has been built.
6). Write code
Add the following code:
[Java]View Plaincopy
- System.out.println ("Hello World by http://blog.csdn.net/unix21");
7). Compile Run
Click Run--run on the menu bar to compile the run, or press CTRL+F11 directly
There are many ways to start a program, and eclipse itself has a lot of shortcut buttons.
After the program compiles successfully, output the results in the console window.
Reprint: http://blog.csdn.net/21aspnet/article/details/18815397
Eclipse New SDK Project