Home >Java >Javagetting Started >How to write java program using eclipse
1. First open eclipse, right-click on the blank space on the Package Explorer bar, and select New--->Java Project
## in the menu that appears.
##5. Right-click on the registration and select the following options
6. After confirmation, the following interface will appear. Name the name as the name of the program, check the main method, as shown in the figure, and click finish
7. As shown in the figure, a program named test The java file is written. You can write your own program in the main method. After writing, right-click and select the following options. After confirmation, the program will compile and run. If there are no errors in the program, the running results will appear on the console. Otherwise, control The error message
#8 will appear on the station. As shown in the figure, the running result of the above simple program is 30
Recommended tutorial :
The above is the detailed content of How to write java program using eclipse. For more information, please follow other related articles on the PHP Chinese website!