无法修复“语法错误,'for each'语句仅在源级别为1.5时可用". [英] Unable to fix "Syntax error, 'for each' statements are only available if source level is 1.5"

查看:272
本文介绍了无法修复“语法错误,'for each'语句仅在源级别为1.5时可用".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个Java代理,该代理使用参数化的收集类型和增强的for循环.然后,Domino Designer 8.5.3告诉我通过快速修复操作将项目的遵从性级别更改为1.5.

I am writing a Java Agent which uses parameterized collection types and enhanced-for loops. Domino Designer 8.5.3 then tells me to change the project's compliance level to 1.5 in a quick-fix action.

如果我这样做,项目将重建并且没有任何更改.如果我转到项目的Java编译器设置以手动设置它,或者在工作区设置中对其进行更改,则什么也没有发生.如何摆脱这个错误?

If I do that, the project rebuilds and nothing changes. Nothing happens if I go to the project's Java Compiler settings to set it manually, or change it in the workspace settings either. How can I get rid of this error?

推荐答案

Domino Designer中存在一个令人讨厌的错误.客户端重新启动后,文件/首选项"中的编译器符合性级别"将始终显示1.5,并且对Java代理完全没有影响.

There is an annoying bug in Domino Designer. The "Compiler Compliance Level" in File / Preferences will always show 1.5 after a client restart and has no affect at all on Java Agents.

要设置代理的遵从性级别,请打开该代理并打开一个Java类.打开菜单项目/属性-> Java编译器.设置为启用项目特殊设置",并将编译器符合级别"设置为1.6.

To set the compliance level for an agent open the agent and open a java class. Open Menu Project / Properties -> Java Compiler. Set to "Enable Project special settings" and set "Compiler Compliance Level" to 1.6.

要查看代理的合规性级别,请打开代理视图,单击一个代理(不要打开它),然后在属性/字段"中查看,"$ JavaCompilerSource"和"$ JavaCompilerTarget"字段将显示该信息.

To view the compliance level for a agent open the agent view, click on a agent (don't open it) an look at Properties / Fields, the fields "$JavaCompilerSource" and "$JavaCompilerTarget" will show the information.

这篇关于无法修复“语法错误,'for each'语句仅在源级别为1.5时可用".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆