You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[java] Provide ability to disable auxClasspath warning added in 7.27.0 #7056
Starting with pmd 7.27.0 I see the following message:
Adding current platform %JAVA_HOME%/Contents/Home/lib/jrt-fs.jar to auxClasspath, which could be the wrong java version. Please add the correct jrt-fs.jar explicitly to the auxClasspath.
(I replaced my java home with %JAVA_HOME%.)
Describe the solution you'd like
Please give me the option to disable this warning.
I'd rather not fiddle around with the auxClasspath manually, as the mentioned heuristic seems totally fine to me.
If this really is a critical problem then please provide additional information via link to relevant documentation about how to best fix the issue.
I didn't want to create a bug for this since everything might work as intended.
Environment
------------------------------------------------------------
Gradle 9.7.1
------------------------------------------------------------
Build time: 2026-08-19 14:16:09 UTC
Revision: 92f0512e7f06d84621afba191f75e265363890cf
Kotlin: 2.4.0
Groovy: 4.0.32
Ant: Apache Ant(TM) version 1.10.17 compiled on April 6 2026
Launcher JVM: 17.0.18 (Eclipse Adoptium 17.0.18+8)
Daemon JVM: %JAVA_HOME%/Contents/Home (no Daemon JVM specified, using current Java home)
OS: Mac OS X 26.6.2 aarch64
No, I didn't see this in the documentation. That link to the PMD documentation should be added to the above message!
The thing is... I'm using PMD via Gradle. And I asked an A-One about how to best solve this issue. It suggested replicating what is done in the above heuristic, just in the Gradle build file. I'd rather not do that.
The message says that the heuristic "could" be wrong. But it actually isn't. The existing heuristic does exactly what I would expect and want.
btw. using the approach from #5299, we could be certain, whether the java version is correct (assuming, the default language version is correct when calling PMD) and could the decide to not display a warning.
changed the title [-]Please provide ability to disable warning added in 7.27.0[/-][+][java] Provide ability to disable auxClasspath warning added in 7.27.0[/+]on Sep 18, 2026
Activity
UncleOwen commentedon Sep 10, 2026
Have you read https://docs.pmd-code.org/pmd-doc-7.27.0/pmd_languages_java.html#providing-the-auxiliary-classpath?
adangel commentedon Sep 10, 2026
For gradle:
Gradle can already handle this, by using the
pmdAuxconfiguration when setting these dependencies, such as:See https://docs.gradle.org/current/userguide/pmd_plugin.html#sec:pmd_dependency_management
(Copied from #6224 (comment))
huxi commentedon Sep 10, 2026
No, I didn't see this in the documentation. That link to the PMD documentation should be added to the above message!
The thing is... I'm using PMD via Gradle. And I asked an A-One about how to best solve this issue. It suggested replicating what is done in the above heuristic, just in the Gradle build file. I'd rather not do that.
The message says that the heuristic "could" be wrong. But it actually isn't. The existing heuristic does exactly what I would expect and want.
adangel commentedon Sep 10, 2026
btw. using the approach from #5299, we could be certain, whether the java version is correct (assuming, the default language version is correct when calling PMD) and could the decide to not display a warning.
gredler commentedon Sep 16, 2026
I'm also using PMD via Gradle and suddenly get these spurious warnings.
[-]Please provide ability to disable warning added in 7.27.0[/-][+][java] Provide ability to disable auxClasspath warning added in 7.27.0[/+]Update release notes (pmd#7056)
Explicitly configure jrt-fs.jar on auxClasspath (ant and gradle) (#46)
[java] Fix pmd#7056: Add JavaLanguageProperty to disable auxClasspath…