简体   繁体   English

PMD Eclipse JDK兼容性

[英]pmd eclipse jdk compatibility

I have installed version 3.2.6.v200903300643 of the PMD Plug-in for Eclipse (which is version 3.7.*). 我已经安装了用于Eclipse的PMD插件版本3.2.6.v200903300643(版本3.7。*)。

When I try to run the Generate Abstract Syntax Tree, I get the following error 当我尝试运行“生成抽象语法树”时,出现以下错误

PMD Exception : net.sourceforge.pmd.ast.ParseException: Can't use static imports when running in JDK 1.4 mode PMD异常:net.sourceforge.pmd.ast.ParseException:在JDK 1.4模式下运行时无法使用静态导入

My question is: How can I configure which JDK compatibility mode PMD is running in when used through Eclipse ? 我的问题是:当通过Eclipse使用时,如何配置PMD在哪种JDK兼容模式下运行?

I can't find any configuration options for this in the properties overview. 我在属性概述中找不到任何配置选项。

Regards Esben 问候埃斯本

Most probably you need to configure the maven-pmd-plugin to use the correct targetJdk option value. 您很可能需要配置maven-pmd-plugin以使用正确的targetJdk选项值。 It does not explicitly say if this option defaults to 1.4 , but it seems so. 它没有明确说明此选项是否默认为1.4 ,但似乎是这样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM