Mac下Intellij更换JDK后的配置

来源:互联网 发布:c语言实型怎么定 编辑:程序博客网 时间:2024/06/07 05:33

版本:IntelliJ IDEA 2016.2.4
JDK: 1.7->1.8

我在项目的进行中把jdk从1.7改为1.8了,之后出现的问题是Usage of API documented as @since 1.6+ …

解决方法为,把Intellij中有关jdk版本,bytecode版本和language level都改为1.8(8),步骤:

  1. IntelliJ IDEA -> Preferences -> Build, Execution, Deployment -> Complier -> Java Complier -> Project bytecode version 和 Per-module bytecode version 中的 Target bytecode version 都改为1.8,apply

  2. File -> Project Structure -> Modules -> Source -> Language Level 改为 8,apply

  3. File -> Project Structure -> SDKs 用”+”添加”JDK” 1.8 ,设置name为1.8, JDK Home Path为jdk文件下Contents -> Home。添加完成后到File -> Project Structure -> Project 设置Project SDK为新添加的1.8,apply

0 0
原创粉丝点击