Home  >  Article  >  Development Tools  >  How to run code in notepad

How to run code in notepad

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-08-16 14:13:459454browse

How to run code in notepad

How does notepad run code? Take JAVA as an example below:

Toolbar->Run, click and select "Run".

How to run code in notepad

1. In the run window, enter:

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 and add a method to run JAVA.

Input in the running window:

cmd /k java -cp "$(CURRENT_DIRECTORY)" "$(NAME_PART)" & PAUSE & EXIT

Related recommendations: "Notepad using graphic tutorial"

After clicking save, in the pop-up window Set name: Name it "JAVA Run".

How to run code in notepad

After the addition is successful, it will be displayed under the run menu:

How to run code in notepad

Open the .java file and click "Compile JAVA", successful Then click "Run JAVA" to call the CMD command to run the JAVA code.

How to run code in notepad

It is troublesome to click and run manually. You can set shortcut keys to compile JAVA: Alt Shift B; to run JAVA: Alt Shift R.

How to run code in notepad

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

Statement:
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