Eclipse集成findbugs

本文描述如何在Eclipse/MyEclipse中集成并使用Findbugs.

一、准备:
1. Requirements
To use the FindBugs Plugin for Eclipse, you need Eclipse 3.3 or later, and JRE/JDK 1.5 or later

2:下载findbugs
参考页面:[url]http://findbugs.sourceforge.net/manual/eclipse.html[/url]
点击下载plugin包
[url]http://prdownloads.sourceforge.net/findbugs/edu.umd.cs.findbugs.plugin.eclipse_1.3.9.20090821.zip?download[/url]

二、集成
Extract it in Eclipse's "plugins" subdirectory. (So <eclipse_install_dir>/plugins/edu.umd.cs.findbugs.plugin.eclipse_1.3.9.20090821/findbugs.png should be the path to the FindBugs logo.)

CHN:
将edu.umd.cs.findbugs.plugin.eclipse_1.3.9.20090821.zip解压到Eclipse安装目录下的plugins/下。
比如:E:\pro\MyEclipse\eclipse\plugins\edu.umd.cs.findbugs.plugin.eclipse_1.3.9.20090821

由于我装的是MyEclipse6.0所以,我还将此文件拷贝到了E:\pro\MyEclipse\myeclipse\eclipse\plugins\edu.umd.cs.findbugs.plugin.eclipse_1.3.9.20090821
也许是我的环境太乱,只将findbugs的相关文件拷贝到eclipse目录下还不行,还需要拷贝一份到myeclipse的相关目录下,[color=blue]或许你不需要做这一步[/color]。

三、修改bundles.info文件
路径:E:\yangf\app\MyEclipse 8.5\configuration\org.eclipse.equinox.simpleconfigurator

最后一行增加:edu.umd.cs.findbugs.plugin.eclipse,2.0.2.20121210,file:/E:/yangf/app/MyEclipse 8.5/Common/plugins/edu.umd.cs.findbugs.plugin.eclipse_2.0.2.20121210,4,false

四、启动、验证是否OK:
启动Eclipse或MyEclipse
Once the plugin is extracted, start Eclipse and choose Help → About Eclipse Platform → Plug-in Details. You should find a plugin called "FindBugs Plug-in" provided by "FindBugs Project".

CHN:
点击-->Help-->About MyEclipse Enterprise Workbench-->Plug-in Details正常的话,可以看到findbugs的信息。

[img]http://dl.iteye.com/upload/attachment/292872/a76173c0-b781-376b-9160-b1511a3d5e39.jpg[/img]

五、使用:
右击Project,选择Findbugs

[img]http://dl.iteye.com/upload/attachment/292874/10ccbaca-2e4c-30af-a5a9-63320473da45.jpg[/img]

[img]http://dl.iteye.com/upload/attachment/292878/07e180b8-c582-3192-831e-9faacb96fbb8.jpg[/img]


六、设置findbugs细节:
window-->preferences-->java-->findbugs

[img]http://dl.iteye.com/upload/attachment/292876/46d5f672-f9ac-3cfb-9328-71a3e80a135c.jpg[/img]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值