1 在Eclipse中配置代码审查与分析工具
1.1 Checkstyle
点击eclipse窗口上方的windows,选择install new software,在新弹出的work with栏输入checkstyle的地址:http://eclipse-cs.sf.net/update,在name栏经pending后选中出现的两个要安装的选项,一路点击next即可,如下图:
Windows->preference选择checkstyle,点击Sun Checks,点击Set as Default,apply and close
1.2 PMD
安装方式与checkstyle类似:
配置:打开eclipse菜单栏:Windows->preferences,选择PMD栏目,如下图:
勾选use global rule management,即可使用自带规则集。
1.3 FindBugs
安装过程与checkstyle相似
1.4 VisualVM
安装:
1. 从http://visualvm.github.io/idesupport.html 下载eclipse插件,将其解压到一个目录里,比如G:\\eclipse\visualvm_launcher_u1_eclipse_36
2. 在Eclipse中加入新插件:Help->install new software 然后点击add->local,选择刚刚解压的visualvm_launcher_u1_eclipse_36目录
点击ok
一路点击next最后finish,安装过程中出现warning,点击install anyway,最后按照eclipse提示重启即可
3. Windows->preference找到VisualVM configure,配置JDK路径和jdk\bin\jvisualvm.exe