2
我今天从Repo下载项目并尝试第一次运行它,它不会选择安装JDK 1.8。在您downvote陈述这是重复的问题之前,我已经检查了this和this和this。我已经在互联网上到处检查,但无济于事。如果Downvotiong,给出明确/非常坚实的理由相同。Intellij拿起JDK 1.6而不是1.8
以下是错误信息: -
error: diamond operator is not supported in -source 1.6
Set<String> result = new HashSet<>();
^
使用Mac和IntelliJ终极林
。这里是我的java --version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
这里是我的文件>项目结构>模块>来源
8. Lambdas, type annotations etc.
文件>项目结构>项目>项目SDK>javaversion "1.8.0_25"
项目的语言水平>SDK Default(8 - Lambdas, type annotation etc.)
在我的/ bash_profile中有export JAVA_HOME=$(/usr/libexec/java_home -v 1.8.0_25)
此外,如果upvoting请提及相同的原因,以便我非常明确地记住 – Jagvir
当您进入Project Structure> Modules>(选取模块)> Dependencies> Module SDK时,您会得到什么? – rgettman
@rgettman我在模块SDK中看到1.8(java version 1.8.0_25“)Apply> Restart> Run:'Grails:。同样的错误 –
Jagvir