Eclipse Getting Started (2)

xiaoxiao2021-03-06  62

Write the Hello World program Let's write a HellWorld program, steps below: 1. Select File → New → Item; 2. Project categories selection Java; 3. The project list selection Java project; 4. Click "Next"; 5. Enter the project name, for example: helloproject; 6. Click "Finish"; 7. Click the "Create Java Class" in the tool bar (with a C mark); 8. Enter helloWorld; 9 in the name domain; Click on the PUBLIC Static Void Main (String [] args) check box to create the MAIN method; 10. Click "Finish"; 11. A Java editing window will open, enter the system.out.println ("Hello World") line in the main method; 12. Use Ctrl-S to save, which will automatically compile helloWorld.java; 13. Click the "Run" button in the toolbar; 14. Select "Java Application" and select "New"; 15. Enter the project name Hello-Project and Main class name HelloWorld; 16. Click "Run"; 17. At this time, you will open a console window, a "Hello World" will appear inside. Eclipse has an incremental compiler that automatically compiles every time a Java file is saved. This feature is called "automatic build". If this feature is not required, you can perform automatic build on the window → preference → Workbench → to perform automatic build, turn off this feature. The "All Build" button will appear in the toolbar. Similar options will also appear in the relevant menu. Creating a CVS Resource Library Now we know how to create a project, the next step is to establish a connection with a version server to publish the project to the version server. At present, open source software uses CVS to make version management, so we also use CVS to exemplify. The Eclipse SDK has included a plug-in that supports CVS. To use other version management software, such as VSS, you can download related plugins from the Eclipse website. The steps to create a CVS repository location are as follows: 1. Open CVS Resource Library Development Perspective (Window → Open Perspective → Other → CVS Resource Library Development). 2. Right-click on the CVS repository view, create a new → repository location. 3. Enter the details of CVS Server in the Add CVS Resource Board dialog. 4. Click "Finish". 5. Once the CVS repository is configured, you can enter the project to enter the repository. Go to the Java perspective, right click on the project name, select the group → sharing item. 6. Select the repository that just added. 7. Click "Finish". 8. Right-click on the project in the synchronization window, choose the submission. 9. Enter a comment for submitting. 10. Click "OK", the project is released to the CVS repository. 11. After sharing projects in the resource library, you can use the "Synchronization" feature to "Synchronize" and caught up with someone else's modifications to the code in the resource library. Right-click on the project, group → synchronize with the repository.

转载请注明原文地址:https://www.9cbs.com/read-112640.html

New Post(0)