- Java JRE 1.5 or higher (see section below for Java JRE 1.4 Support)
- WinZip or the free
Download the latest binary distribution (http://pmd.sourceforge.net/)-I. e., pmd-bin-x.xx.zip
Unzip it into any directory, I. e., D: \ PMD \
========================================================== ========================================================== ========================================================== =====
To install the PMD plugin for Eclipse:
- Start eclipse and open a project
- Select "help"-> "Software Updates"-> "find and install"
- Click "Next", then click "new remote site"
- Enter "PMD" into the name field and
Http://sourceforge.net/projects/pmd/files/pmd-eclipse/update-site/ into the URL Field
- Click through the rest of the dialog boxes to install the plugin
Alternatively, you can download the latest ZIP file and follow the aboveprocedures before t for using "new local site" and browsing to thedownloaded ZIP file.
To configure PMD, select "Windows"-> "Preferences", then select PMD.
To run PMD, right-click on a project node and select "PMD"-> "check code with PMD ".
To run the duplicate code detector, right-click on a project node andselect "PMD"-> "find Suspect cut and paste ". the reportwill be placed in a "reports" directory in a file called "cpd-report.txt ".
To find additional help for other features, please read completed ded help byselecting help-> help contents and browse the "how to..." sectionin the "PMD plugin documentation" book.
After installing an update, if you get an exception such as "Java. lang. runtimeexception: couldn't find that class XXXXX ", trydeleting the ruleset. XML file in. metadata/plugins/net. sourceForge. PMD. eclipse directory in your workspace.
To get eclipse to not flag the @ suppresswarnings ("PMD") annotation, look under the menu headings Java-> compiler-> errors/warnings-> annotations-> unhandled warning token.