#How to save java program?
How to export, save and run the written JAVA program
1. First, you need to write a "hello, good afternoon" program in Notepad.
#2. After writing is completed, save the file and change the file name to the same as the class name.
#3. Change the file format from .txt to .java file.
#4. After the changes are completed, open the cmd command (wins R).
#5. Enter javac. If many things appear below, it means that the environment variables have been configured successfully. Otherwise, you need to configure the environment variables.
#6. Find the location of the .java file and find it in cmd (D drive).
7. Enter the folder where the .java file is located in cmd, enter javac class name.java, and the same name will appear where the .java file exists. class file.
#8. Enter the java class name, and the .java file will be run and "hello, good afternoon" will be output.
The above is the detailed content of How to save java program?. For more information, please follow other related articles on the PHP Chinese website!