eclipse安装checkstyle、PMD、FindBugs、VisualVM
1.前言
Eclipse 安装插件一般都两种方式,一种是自动傻瓜式安装,仅需输入安装网址,即可自动安装;另外一种是下载对应压缩包,拷贝里面的两个文件夹plugins和 features下面的文件分别到eclipse目录下面对应的plugins和features目录。然后重启eclipse,即可使用,本教程主要介绍傻瓜式安装方式。
2.安装CheckStyle
选择Help->Marketplace,输入Checkstyle搜索,点击Install安装。安装完毕后重启Eclipse。
在eclipse中打开Windows>>Preferences>>Checkstyle,点击Sun Checks,再点击Set default将其设为默认。
**CheckStyle
3.安装PMD
1.In Eclipse->Help->Install New Software
2.Click on Add..
3.Enter the following:
Name:PMDfor Eclipse Update Site
URL:https://dl.bintray.com/pmd/pmd-eclipse-plugin/updates/
and click OK
4.You should see PMD for Eclipse 4. Select the checkbox next to it and click Next>.
5.You'll need toaccept the license and confirm you want to install a plugin that is notdigitally signed. Go ahead and install it anyway.
6.Restarteclipse.
随后,在项目上右键->PMD->Check Code,可对代码进行静态分析。
3.FindBugs
打开EclipseàHelpàMarketplace,搜索FindBugs,点击Install安装。安装完成后重启Eclipse。
随后在项目上右键->Find Bugs->Find Bugs即可
4.VisualVM
1、Use the Eclipse Launcher to integrateVisualVM with the Eclipse IDE. The plugin enables starting VisualVM along withthe executed application and automatically opens the application tab.
2、Installation: download the plugin (.zip,38.8KB), unzip it and add as a local update site, then install the VisualVMLauncher Feature.
3、Configuration: setup the plugin byconfiguring path to JDK (not JRE) and VisualVM installation usingRun/Debug-Launching-VisualVM Configuration.
4、Usage: create a custom applicationconfiguration and choose the VisualVM Launcher as application launcher for theRun/Debug actions.
重启Eclipse,点击Windows->Preference->Run/Debug->Launching->VisualVM 配置
随后运行程序即可。