加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

java – IntelliJ 2018.1首选项中的“使用’ – release’选项”

发布时间:2020-12-15 00:51:34 所属栏目:Java 来源:网络整理
导读:在IntelliJ 2018.1(构建,执行,部署编译器 Java编译器)的首选项中,有一个标记为的复选框: Use ‘–release’ option for cross-compilation (Java 9 and later) 我在网上搜索时找到了相关信息. “?”单击帮助图标时出现404错误. 这个选项的目的/功能是什么
在IntelliJ 2018.1(构建,执行,部署>编译器> Java编译器)的首选项中,有一个标记为的复选框:

Use ‘–release’ option for cross-compilation (Java 9 and later)

我在网上搜索时找到了相关信息. “?”单击帮助图标时出现404错误.

这个选项的目的/功能是什么?

解决方法

帮助部分 can be found here:

By default,this option is selected. IntelliJ IDEA deduces from
project settings when the cross-compilation is needed and
automatically applies the –release compiler option for Java 9.

什么是–release选项?它是一个新的命令行选项,在JEP 247: Compile for Older Platform Versions中定义.

A new command-line option,--release,is defined,which automatically configures the compiler to produce class files that will link against an implementation of the given platform version.

在good answer here讨论.

另请参阅IDEA-184333以了解IDE中添加此选项的背景.简而言之,一些用户只需为其项目指定-source和-target版本,而无需设置-bootclasspath选项.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读