[英]How to set default JDK Compliance level and release enabled in eclipse JDK preferences section
I want to perform a PDE build for my RCP product.我想为我的 RCP 产品执行 PDE 构建。 I am compiling my product with JDK 11 but I want to set --release option as 1.8.
我正在使用 JDK 11 编译我的产品,但我想将 --release 选项设置为 1.8。 I wanted to know how we can provide a default compliance setting in eclipse.
我想知道我们如何在 eclipse 中提供默认的合规性设置。 So I can build my product with eclipse settings.
所以我可以使用 eclipse 设置来构建我的产品。
I want to set --release option as 8. But we can't add release option to <java />
tag.我想将 --release 选项设置为 8。但是我们不能将发布选项添加到
<java />
标签。 So I need to set a compliance level as 1.8 (by default) in JDT preferences.所以我需要在 JDT 首选项中将合规级别设置为 1.8(默认情况下)。
Can anyone answer how we can set default compliance level and enable --release option in eclipse?谁能回答我们如何在 eclipse 中设置默认合规级别并启用 --release 选项?
The eclipse version is 4.12 and I want to set release option as 8 for PDE build. eclipse 版本是 4.12,我想将发布选项设置为 8 用于 PDE 构建。
What all the options I have tried我尝试过的所有选项
org.eclipse.jdt.core.prefs
from workspace to \eclipse\configuration.settingsorg.eclipse.jdt.core.prefs
从工作区复制到\eclipse\configuration.settings Thanks in advance.提前致谢。
Eclipse works on workspace level. Eclipse 在工作区级别上工作。 So all the configuration are stored in workspace.
所以所有的配置都存储在工作区中。 Project > Properties: Java Compiler will set the java compiler version to one particular version for a workspace.
项目 > 属性:Java 编译器会将 java 编译器版本设置为工作区的一个特定版本。 You may not be able to set it for all workspace in one shot in Eclipse.
您可能无法在 Eclipse 中一次性为所有工作区设置它。
I would suggest the following我建议以下
then start eclipse and check.然后启动 eclipse 并检查。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.