我的问题是我希望更新基于特性的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
答案 0 :(得分:1)
为什么不在插件中将Bundle-RequiredExecutionEnvironment设置为Java 5,而不是在PDE Build中执行此操作? PDE中的清单编辑器将帮助您将其设置为正确的值。