Getting started with Eclipse (2)

Source: Internet
Author: User
Write a Hello World Program

The following describes how to write a HellWorld program:

1. Select File → new → project;

2. Select Java for the project category;

3. Select a Java project from the project list;

4. Click "Next ";

5. Enter the project name, for example, HelloProject;

6. Click "finish ";

7. Click the "Create Java class" button in the toolbar (with a C mark );

8. Enter HelloWorld In the Name field;

9. Click the public static void main (String [] args) check box to let Eclipse create the main method;

10. Click "finish ";

11. A Java editing window will open. In the main method, enter the System. out. println ("Hello World") line;

12. Save with Ctrl-s, which will automatically compile HelloWorld. java;

13. Click "run" in the toolbar;

14. Select "Java application" and then select "new ";

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

16. Click "run ";

17. At this time, a console window will be opened, and a "Hello World" will be displayed in it.

Eclipse has an incremental compiler that automatically compiles each time a Java file is saved. This feature is called "auto build ". If you do not need this function, you can choose Window> preference> workbench> execute automatic building for resource modification to disable this feature. The create all button is displayed in the toolbar. Similar options will also appear in related menus.

Create a CVS resource library

Now we know how to create a project. The next step is to establish a connection with a version server and release the project to the version server. Currently, open-source software uses CVS for version management, so we also use CVS as an example. The Eclipse SDK already includes Plug-ins that support CVS. to use other version management software, such as VSS, you can download related plug-ins from the Eclipse website. To create a CVS resource library, follow these steps:

1. Open the development perspective of the CVS resource library (window → open perspective → others → development of the CVS resource library ).

2. Right-click the CVS resource pool view and choose create> resource pool location.

3. In the Add CVS resource library dialog box, enter the details of the CVS Server.

4. Click "finish ".

5. Once the CVS resource library is configured, You can input the project into the resource library. Go to the Java perspective, right-click the project name, select group> share project.

6. Select the resource library you just added.

7. Click "finish ".

8. Right-click the project in the synchronization window and select submit.

9. Enter the comments for submission.

10. Click "OK" to publish the project to the CVS resource library.

11. After sharing a project to the resource library, you can use the "synchronize with resource library" function to publish code and make modifications to the Code in the resource library. Right-click the project, and select "group"> "synchronize with the resource library.

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.