Write Hello World program with Eclipse

Source: Internet
Author: User
Write Hello World program with Eclipse

Here we write a hellworld program, which is as follows:

1. Select file → new → project;

2. Select Java for Project category;

3. Project list select Java Project;

4. Click "Next";

5. Enter the project name, for example: Helloproject;

6. Click "Finish";

7. Click the "Create Java Class" button (with a C tag) in the sidebar.
Click the "Create Java Class" button

8. Enter HelloWorld in the Name field;

9. Click the check box of the public static void main (string[] args) to have eclipse create the main method;

10. Click "Finish";

11. A Java editing window opens and enters the System.out.println ("Hello World") row in the Main method;

12. Use Ctrl-s to save, which will automatically compile the Helloworld.java;

13. Click the "Run" button in the sidebar;

14. Select "Java Application" and choose "new";

15. Enter the project name Hello-project and main class name HelloWorld;

16. Click "Run";

17. At this point, a console window will open, and the word "Hello World" will be displayed inside

Eclipse has an incremental compiler that compiles automatically each time a Java file is saved. This feature is called "Automatic Build". If this feature is not required, it can be automatically built on the window → preferences → workbench → on resource modifications, and turn off this feature. The "Build All" button appears in the sidebar. Similar options will appear in the relevant menu.

Article Source: http://xiuchunyong.blog.ccidnet.com/blog-htm-do-showone-type-blog-itemid-149968-uid-45441.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.