RSS

Syntax error, annotations are only available if source level is 1.5

在 Eclipse 或者 MyEclipse 开发环境中,运用 Hibernate 开发项目时,如果碰到下面这样的错误:
Syntax error, annotations are only available if source level is 1.5

解决办法是:

在项目上右键 -> Properties -> Java Compiler,在 Compiler compliance level: 后的下拉列表中,选择 1.5 或 1.5 以上即可。

此条目发表在 错误警告 分类目录,贴了 , , , 标签。将 固定链接 加入收藏夹。

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注