Reputation: 806
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
Upvotes: 1
Views: 1483
Reputation: 29139
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.
Upvotes: 1