zoukankan      html  css  js  c++  java
  • Idea中JDK为1.8,还提示Diamond types are not supported at this language level

    help------about查看ide的版本:

    IntelliJ IDEA 2017.3.7 (Ultimate Edition)
    Build #IU-173.4710.11, built on April 4, 2019
    Licensed to Rover12421 / Rover12421
    You have a perpetual fallback license for this version
    Subscription is active until December 31, 2099
    JRE: 1.8.0_152-release-1024-b18 amd64
    JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
    Windows 7 6.1

    新建的一个maven项目,一路点next创建的,结果 new KafkaProducer<>的时候报错:

    Diamond types are not supported at this language level

     可以看到Diamond 是JDK1.7的特性,所以1.5肯定是不支持的。

    右键项目,选择Open Module Setting

    打开如下的弹窗,报错就是这里的Language level默认还是5.0

  • 相关阅读:
    1. jQuery中的DOM操作
    jQuery查找节点(选择器)
    机器学习基础
    CRF
    NP
    LP
    kernel
    SVM
    凸优化和对偶
    语音识别 -- 概述
  • 原文地址:https://www.cnblogs.com/mkl34367803/p/11183438.html
Copyright © 2011-2022 走看看