在构思ide中获取菱形运算符的编译错误 [英] getting compile error for diamond operator in idea ide

查看:119
本文介绍了在构思ide中获取菱形运算符的编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试编译ide ide中的一些简单源代码时遇到此错误。

I am getting this error while trying to compile some simple source code in idea ide.

java: diamond operator is not supported in -source 1.6 (use -source 7 or higher to enable diamond operator)

jdk是1.7。 40来自oracle

jdk is 1.7.40 from oracle

但这个地方添加这个-source 7选项在哪里?

but where is this place to add this "-source 7" option?

我尝试过添加ide设置但没有效果。

i tried adding in ide settings but that had no effect.

推荐答案

您需要设置项目语言级别(所有模块的默认值)模块语言级别

You need to set the project language level (default for all modules) and the module(s) language level


这篇关于在构思ide中获取菱形运算符的编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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