Home > Article > Development Tools > How to run java in notepad
Click "Run" and select "Run" in the submenu.
1. Enter in the run window:
cmd /k javac "$(FULL_CURRENT_PATH)" & echo 编译成功! & PAUSE & EXIT
After clicking Save, set the name in the pop-up window: Name it JAVA Compilation
2. Repeat the above steps to add the method of running JAVA
Input in the run window:
cmd /k java -cp "$(CURRENT_DIRECTORY)" "$(NAME_PART)" & PAUSE & EXIT
After clicking save, set the name in the pop-up window: name it JAVA Run
Related recommendations: "Notepad usage graphic tutorial"
After the addition is successful, it will be displayed under the run menu:
Open the .java file, click "Compile JAVA", and then click "Run JAVA" after success to call the CMD command to run the JAVA code.
It is troublesome to click and run manually. You can set shortcut keys to compile JAVA: Alt Shift B and run JAVA: Alt Shift R
The above is the detailed content of How to run java in notepad. For more information, please follow other related articles on the PHP Chinese website!