Home > Common Problem > How eclipse runs code

How eclipse runs code

coldplay.xixi
Release: 2020-11-30 11:21:32
Original
34176 people have browsed it

How to run code in eclipse: first open eclipes and complete the startup; then create a new project and create a package; then create a java file; finally write the source code in the source code editor and run it.

How eclipse runs code

The operating environment of this tutorial: Windows 7 system, eclipse version 4.8. This method is suitable for all brands of computers.

How to run code with eclipse:

1. Find eclipes on the desktop and double-click to open it.

2. During the startup process of eclipes, a window will pop up asking you to fill in the saving directory of the java workspace. All source code files you write will be saved in this directory. It is recommended not to save the workspace. Place it on the C drive

Note: Modify the workspace path File -> Switch Workspace

3. After ecplies is started, there will be a welcome page. Don’t worry about this. Just click on the upper left Just cancel the difference number, and then you will enter the main interface of eclipes.

4. Create a new project: Click file -》new -》java-Project in the upper left corner, a small window will pop up, fill in the project name and click to confirm.

5. Create a package: Click on the project, open it and find src, right-click on new =》package, write the package name, and click OK.

6. Create a java file: right-click the software package, create a java file under the software package, right-click new -》class

7. Write: write the source in the source code editor code. and save.

8. Run: Right-click the java file in the file browser, and then click run as. The running results will appear in the command line window below.

The above is the detailed content of How eclipse runs code. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template