"Java" notepade++ how to compile and run Java files directly

Source: Internet
Author: User

    1. Install notepad++ and JDK (slightly);
    2. notepad++ menu bar: Plug-in->plugin manager->show Plugin manager,available tick nppexec, click the Install button.
    3. Press Fn+f6 or menu bar: Plug-in->nppexec->execute, enter the following code:
"$(FILE_NAME)"java.exe "$(NAME_PART)"

Shown

Click the Sava button, name the Java compilation plus execute, click the Sava button, click OK to close the dialog box.
4. Menu bar: Plugin->nppexec, tick follow $ (current_directory).
5. Press Fn+f6 and the following dialog box appears:

Click OK or enter directly to start compiling and executing the program:

6. Error when printing Chinese characters in UTF-8:

HelloWorld.java:6: 错误: 编码GBK的不可映射字符        System.out.println("鏈?灏忓?硷細Byte.MIN_VALUE=");

The workaround is to modify the script code above to:

NPP_SAVEjavac.exe -encoding UTF-8 "$(FILE_NAME)"java.exe "$(NAME_PART)"

Original link: notepad++ Direct compile run Java command

"Java" notepade++ how to compile and run Java files directly

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.