Home  >  Article  >  Development Tools  >  How to set up java in notepad

How to set up java in notepad

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-08-19 17:04:444377browse

How to set up java in notepadNotepad Steps to configure the java compilation environment:

1. Configure the JDK environment

2. Download and install the NppExec plug-in for Notepad

3. NppExec plug-in option--->Execute 

  javac "$(FULL_CURRENT_PATH)" 
  echo 
  echo =============== 编译成功后开始运行 =============== 
  echo 若不使用 -cp , 则需使用 cd 切换至当前目录, 或勾选 Follow CURRENT_DIRECTORY 菜单项 
  echo 
  java -cp "$(CURRENT_DIRECTORY)" "$(NAME_PART)"

4. Click Save and give it a name. If you just want to compile or run, just separate the commands.

Related recommendations: "Notepad usage graphic tutorial"

5. NppExec-->Advance Options configuration is as follows:

How to set up java in notepad

6. Restart NotePad after saving.

7. Afterwards, you can see the running command in the plug-in-->NppExec-->, and then configure the shortcut keys in the shortcut menu.

FULL_CURRENT_PATH File path name xxx:\xx.java
CURRENT_DIRECTORY File directory xxx:\
FILE_NAME Full file name xx.java
NAME_PART File name xx
EXT_PART File extension java

The above is the detailed content of How to set up java 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
Previous article:How to run notepad cNext article:How to run notepad c