简体   繁体   English

当我要冒这样的错误(使用-source 5或更高版本以启用注释)时

[英]When I am going to make war giving error like this (use -source 5 or higher to enable annotations)

When I am going to make war giving error like this (use -source 5 or higher to enable annotations); 当我-source 5这样的错误(使用-source 5或更高版本来启用注释)时;

see the image: 看到图片:

图片 .

Are you using maven to build your war file? 您是否正在使用Maven构建战争文件? If this is the case you should check your projects .pom file to ensure you have set your java version correctly, within your build plugin. 如果是这种情况,则应检查项目.pom文件,以确保在构建插件中正确设置了Java版本。

<configuration>
  <source>1.7</source> 
  <target>1.7</target>
</configuration>

暂无
暂无

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

相关问题 Maven编译错误:(使用-source 7或更高版本启用菱形运算符) - Maven Compilation Error: (use -source 7 or higher to enable diamond operator) (使用-source 7或更高版本在开关中启用字符串)错误; Netbeans 7.1.2 - (use -source 7 or higher to enable strings in switch) error;Netbeans 7.1.2 source 1.3(使用-source 5或更高版本来启用泛型) - source 1.3 (use -source 5 or higher to enable generics) 错误:(24,46)错误:-source 1.6不支持Diamond运算符(使用-source 7或更高版本来启用Diamond运算符) - Error:(24, 46) error: diamond operator is not supported in -source 1.6 (use -source 7 or higher to enable diamond operator) MCP-“使用-source 7或更高版本在开关中启用字符串” - MCP - “use -source 7 or higher to enable strings in switch” HEROKU使用-source 7或更高版本来启用钻石操作员 - HEROKU use -source 7 or higher to enable diamond operator Ant使用-source 7或更高版本来启用钻石操作员 - Ant use -source 7 or higher to enable diamond operator -source 1.6 [错误] 不支持 lambda 表达式(使用 -source 8 或更高版本以启用 lambda 表达式) - lambda expressions are not supported in -source 1.6 [ERROR] (use -source 8 or higher to enable lambda expressions) Java错误 - -source 1.5不支持lambda表达式(使用-source 8或更高版本来启用lambda表达式) - Java Error - lambda expressions are not supported in -source 1.5 (use -source 8 or higher to enable lambda expressions) 错误:(42, 70) java: -source 1.6 不支持文字中的下划线(使用 -source 7 或更高版本来启用文字中的下划线) - Error:(42, 70) java: underscores in literals are not supported in -source 1.6 (use -source 7 or higher to enable underscores in literals)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM