在Eclipse或MyEclipse中安裝findbugs插件

咱們都知道,在Eclipse或MyEclipse(我用的8.0)中安裝插件有兩種方式,一種是在線安裝,第二種是先下載插件而後在本地安裝。
在這裏咱們先介紹第一種在線安裝。
 
Eclipse上在線安裝findbugs(具體步驟以下,就再也不贅述)
 
 
In Eclipse, click on Help -> Software Update -> Find and Install...
Choose the Search for new features to install option, and click Next .
Click New Remote Site .
Enter the following:
Name: FindBugs update site
URL: one of the following (note: no final slash on the url)
http://findbugs.cs.umd.edu/eclipse for official releases
http://findbugs.cs.umd.edu/eclipse-candidate for candidate releases and official releases
http://findbugs.cs.umd.edu/eclipse-daily for all releases, including developmental ones and click OK .
"FindBugs update site" should appear under Sites to include in search . 
Click the checkbox next to it to select it, and click Finish .
You should see FindBugs Feature under Select features to install . 
(You may have to click on one or two triangles to make it visible in the tree.)
Select the checkbox next to it and click next.
Select the I accept option to accept the license and click Next .
Make sure the location is correct where you're installing it. The default (your workspace) should be fine. Click Finish .
The plugin is not digitally signed. Go ahead and install it anyway.
Click Yes to make Eclipse restart itself.
 
可是咱們使用MyEclipse時,通常都是使用的破解版,因此不少插件都沒法在線安裝,只能先下載而後再安裝。
不少時候我以爲這樣很慢,因此我一般採用如下方式:
這裏我介紹第二種方法
MyEclipse8.5 和 Eclipse中安裝findbugs插件
一、首先從findbugs網站下載插件:http://findbugs.sourceforge.net/downloads.html 
二、將下載回來的zip包解壓,findbugs插件和通常的插件不太同樣,通常的插件安裝包解壓后里面通常是包含plugins和features兩個文件夾,咱們只須要把這兩個文件夾下的jar包或文件夾拷貝到Eclipse或MyEclipse安裝路徑下對應的plugins和features文件夾中就OK了。可是findbugs插件壓縮包解壓後獲得文件夾:edu.umd.cs.findbugs.plugin.eclipse_1.3.9.20090821 ,將該文件夾拷貝到myeclipse和Eclipse安裝目錄下plugins目錄下。
個人目錄結構:
Eclipse:D:\Program Files\eclipse4ee\plugins\edu.umd.cs.findbugs.plugin.eclipse_1.3.9.20090821
MyEclipse:D:\Program Files\Genuitec\Common\plugins\edu.umd.cs.findbugs.plugin.eclipse_1.3.9.20090821
三、修改myeclipse和Eclipse安裝目錄下configuration/org.eclipse.equinox.simpleconfigurator的bundles.info文件,在文件最後添加一行:
Eclipse:edu.umd.cs.findbugs.plugin.eclipse,1.3.9.20090821,plugins/edu.umd.cs.findbugs.plugin.eclipse_1.3.9.20090821/,4,false
MyEclipse: 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
注:bundles.info文件中添加的格式爲     插件包名 , 插件版本號 , 插件安裝路徑 , 4 , false
如上findbugs插件:
edu.umd.cs.findbugs.plugin.eclipse:插件的壓縮包名
1.3.9.20090821:該插件的版本號
plugins/edu.umd.cs.findbugs.plugin.eclipse_1.3.9.20090821/ :該插件的安裝路徑,若是插件是一個jar包,則不要最後的/,
例如plugins/org.uddi4j_2.0.5.v200805270300.jar,4,false
,4,false:固定格式
四、重啓myeclipse和Eclipse,選中項目,右鍵會出現一個Find Bugs菜單。至此,findbugs插件安裝完畢。

相關文章
相關標籤/搜索