Headless PDE 构建和 Java 编译器合规性

发布于 2024-11-19 05:56:11 字数 1449 浏览 4 评论 0原文

我的问题是,我希望更新基于功能的 build.properties 文件,以便无头构建过程将使用 Java JRE/JDK 1.6 版本,但符合 Java JRE/JDK 1.5 版本。

如何通过 build.properties 文件在无头构建中实现这一点(即,将设置哪些属性以及设置哪些值)?

我正在考虑 JavaSE-1.6、javaSource 和 javaTarget 属性的设置值的某种组合,如下所示。

任何帮助将不胜感激。

############# JAVA COMPILER OPTIONS ##############
# The location of the Java jars to compile against.  Typically the rt.jar
#  for your JDK/JRE
#bootclasspath=${java.home}/lib/rt.jar

# specific JRE locations to compile against. These values are used to compile
#  bundles specifying a Bundle-RequiredExecutionEnvironment. Uncomment and set
#  values for environments that you support
#CDC-1.0/Foundation-1.0= /path/to/rt.jar
#CDC-1.1/Foundation-1.1=
#OSGi/Minimum-1.0=
#OSGi/Minimum-1.1=
#JRE-1.1=
#J2SE-1.2=
#J2SE-1.3=
#J2SE-1.4=
#J2SE-1.5=
JavaSE-1.6=${java.home}/lib/rt.jar
#PersonalJava-1.1=
#PersonalJava-1.2=
#CDC-1.0/PersonalBasis-1.0=
#CDC-1.0/PersonalJava-1.0i=
#CDC-1.1/PersonalBeclipseasis-1.1=
#CDC-1.1/PersonalJava-1.1=

...

# Default value for the version of the source code. This value is used when
#  compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment
#  or set javacSource in build.properties
javacSource=1.5

# Default value for the version of the byte code targeted. This value is used
#  when compiling plug-ins that do not set the
#  Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties.
javacTarget=1.5

My problem is that I am looking to update a feature-based build.properties file so that the headless build process will use the Java JRE/JDK 1.6 release but will be compliant against the Java JRE/JDK 1.5 release.

How would this be acheived in a headless build through the build.properties file (i.e., which properties would be set and to what values)?

I am thinking of some combination of setting values for the JavaSE-1.6, javaSource, and javaTarget properties, as shown below.

Any help would be greatly appreciated.

############# JAVA COMPILER OPTIONS ##############
# The location of the Java jars to compile against.  Typically the rt.jar
#  for your JDK/JRE
#bootclasspath=${java.home}/lib/rt.jar

# specific JRE locations to compile against. These values are used to compile
#  bundles specifying a Bundle-RequiredExecutionEnvironment. Uncomment and set
#  values for environments that you support
#CDC-1.0/Foundation-1.0= /path/to/rt.jar
#CDC-1.1/Foundation-1.1=
#OSGi/Minimum-1.0=
#OSGi/Minimum-1.1=
#JRE-1.1=
#J2SE-1.2=
#J2SE-1.3=
#J2SE-1.4=
#J2SE-1.5=
JavaSE-1.6=${java.home}/lib/rt.jar
#PersonalJava-1.1=
#PersonalJava-1.2=
#CDC-1.0/PersonalBasis-1.0=
#CDC-1.0/PersonalJava-1.0i=
#CDC-1.1/PersonalBeclipseasis-1.1=
#CDC-1.1/PersonalJava-1.1=

...

# Default value for the version of the source code. This value is used when
#  compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment
#  or set javacSource in build.properties
javacSource=1.5

# Default value for the version of the byte code targeted. This value is used
#  when compiling plug-ins that do not set the
#  Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties.
javacTarget=1.5

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

溺深海 2024-11-26 05:56:11

为什么不将插件中的 Bundle-RequiredExecutionEnvironment 设置为 Java 5,而不是在 PDE 构建中执行此操作? PDE 中的清单编辑器将帮助您将其设置为正确的值。

Rather than doing this in your PDE Build, why don't you set Bundle-RequiredExecutionEnvironment in your plugins to Java 5? The manifest editor in PDE will help you set it to the correct value.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文