准备工具
1、安装 JDK 以及配置相关环境变量;
2、安装 64 位版的 Notepad++ ;
2、一台 64 位 Windows 系统电脑;
一、下载&安装Notepad++
官网下载地址:
https://notepad-plus-plus.org/
![](https://img-blog.csdnimg.cn/img_convert/dda7e57fbf9fdab3e3be2d1d4f960636.png)
PS:Notepad++ 的官网是国外的网站,访问时会特别慢,不过百度上各种资源都是一样的,都能用,Notepad++ 时免费的软件,不需要破解。
嫌麻烦可以点这里直接下载:
点我下载吧!
腾讯电脑管家 >>> 软件管理下载
![](https://img-blog.csdnimg.cn/img_convert/dfb7fdd97945ca8b4a25c5d57b242b1d.png)
安装
按照图示操作即可
![](https://img-blog.csdnimg.cn/img_convert/335b7abfa067c339946c99dac74f64f0.png)
![](https://img-blog.csdnimg.cn/img_convert/a01b0299660879072209a587ad69e0c6.png)
![](https://img-blog.csdnimg.cn/img_convert/60f05744319df48e968640e4dfe0449f.png)
![](https://img-blog.csdnimg.cn/img_convert/6fcfffca18fce8038895dd3a5c408320.png)
![](https://img-blog.csdnimg.cn/img_convert/5a210f9c2c80e869ab758319700e5089.png)
![](https://img-blog.csdnimg.cn/img_convert/44e9cb2f62a025219768e3a815fd8942.png)
![](https://img-blog.csdnimg.cn/img_convert/355fe19e04973060725aa1921e6c805e.png)
配置插件
64位的 Notepad++ 没有插件管理器,需要自己额外安装:
插件管理器点我下载!(内附安装说明)
打开插件管理器并找到 “NppExec” 插件(由于我已经安装,所以找不到)。
![](https://img-blog.csdnimg.cn/img_convert/281456ccc969a2708cc2043a1b314337.png)
插件安装完成后按键盘上的 F6 键,在弹出的对话框内输入如下内容:
NPP_SAVE
cd "$(CURRENT_DIRECTORY)"
javac.exe "$(FILE_NAME)"
java.exe "$(NAME_PART)"
然后点击 Save,起个名字,如图:
![](https://img-blog.csdnimg.cn/img_convert/e53e22caaac21b421fc09773ba9948e8.png)
![](https://img-blog.csdnimg.cn/img_convert/3b3ec95ed2faa5857342f5527d429123.png)
![](https://img-blog.csdnimg.cn/img_convert/2d715bffeff6ec11c160cdd9b2655e30.png)
配置插件属性
![](https://img-blog.csdnimg.cn/img_convert/809b951c9daeb523667c116ed5ef9e33.png)
![](https://img-blog.csdnimg.cn/img_convert/de1febd84e23c4ca22f8a50c5ce21668.png)
这个时候 Notepad++ 提示要求重启,点击确定就行。然后如果没有自动重启就手动重启。
随后点击 设置>>>>首选项
![](https://img-blog.csdnimg.cn/img_convert/a4cba1c1ecdecd691e7683e45febe93b.png)
![](https://img-blog.csdnimg.cn/img_convert/3f48ea33137b61fe640c7fd89e0da31f.png)
![](https://img-blog.csdnimg.cn/img_convert/b5f8a8ce15a97978112f5c5fb90f3282.png)
![](https://img-blog.csdnimg.cn/img_convert/ff34afaacea967b8367d4f376ef8fc96.png)
![](https://img-blog.csdnimg.cn/img_convert/3d9323a910b8d61675543616ec65c7ce.png)
![](https://img-blog.csdnimg.cn/img_convert/b50b14795b0adec20b7d0dc682fd2938.png)
最重要的一步
![](https://img-blog.csdnimg.cn/img_convert/813cdc6fb5d7648bb39517a03f632b4f.png)
![](https://img-blog.csdnimg.cn/img_convert/04520c0816a7eac90c41451912ce9d89.png)
设置完成后,当代码编写完成后,直接使用快捷键,Notepad++会自动完成 “保存>>>编译>>>执行” 操作,可以从下面的控制台查看结果。
![](https://img-blog.csdnimg.cn/img_convert/95d738a79932121733fce7689ccc7edd.png)