To use eclipse-pmd, you need to run Eclipse with Java 21. You can still compile and analyze projects that use an older Java version. To set the JVM, you have to set the parameter -vm in your eclipse.ini accordingly. The Eclipse Wiki explains how to set up the JVM correctly.
The recommended way to install the plugin on Eclipse 2023-12 (and later) is to drag and drop the following button into a running Eclipse workspace: Install eclipse-pmd
An alternative way to install the plugin on Eclipse 2023-12 (and later) is via the plugin update site https://eclipse-pmd.acanda.ch/release/latest.
If you cannot use Java 21 or later for some reason, you can use an older version of eclipse-pmd. Those versions are not maintained anymore and you will not get the latest features if you use their update site.
Java Version | eclipse-pmd Version | Update Site | Updates |
---|---|---|---|
Java 21 | eclipse-pmd 4.x | https://eclipse-pmd.acanda.ch/release/latest | Yes |
Java 17 | eclipse-pmd 3.12 | https://eclipse-pmd.acanda.ch/release/3.12 | No |
Java 11 | eclipse-pmd 2.25 | https://eclipse-pmd.acanda.ch/release/2.25 | No |
Java 7 | eclipse-pmd 1.28 | https://eclipse-pmd.acanda.ch/release/1.28 | No |
If you do not have access to the internet you can download the plugin as a zip file and install it manually.
Use the property dialog of your project(s) to activate eclipse-pmd.