CheckStyle
(1)下载net.sf.eclipsecs_5.3.0.201012121300-updatesite-.zip
(2)打开MyEclipse,Help->Software Updates->Add/Remove Software
(3)Add->Add Archive,选中zip包->next->Apply
(4)右键菜单中出现Checkstyle
FindBugs
(1)下载edu.umd.cs.findbugs.plugin.eclipse_1.3.9.20090821.zip,解压到D:/program files/Genuitec/Common/plugins
(2)D:/program files/Genuitec/MyEclipse 7.5/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info文件末尾添加一行:
edu.umd.cs.findbugs.plugin.eclipse,1.3.9.20090821,file:/d:/Program Files/Genuitec/Common/plugins/edu.umd.cs.findbugs.plugin.eclipse_1.3.9.20090821/,4,false
保存
(3)打开MyEclipse,右键菜单中出现Find bugs
PMD
(1)下载pmd-eclipse-1.8.0.zip,解压将其中的文件夹net.sourceforge.pmd.eclipse_1.8.0拷贝到D:/program files/Genuitec/Common/plugins
(2)D:/program files/Genuitec/MyEclipse 7.5/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info文件末尾添加一行:
net.sourceforge.pmd.eclipse,1.8.0,file:/d:/Program Files/Genuitec/Common/plugins/net.sourceforge.pmd.eclipse_1.8.0/,4,false
保存
(3)打开MyEclipse,右键菜单中出现PMD。如需使用,必须先右键工程->PMD->PMD->Toggle PMD Nature添加PMD特性后方可使用。
FindBugs的GUI版
(1)启动findbugs-1.3.9/bin/findbugs.bat
(2)New Project->添加class和source路径,必要时还可加上辅助jar包路径->finish
(3)check被运行并显示找到的bug