aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVikas Chandra2018-01-31 04:30:01 -0500
committerVikas Chandra2018-01-31 04:30:01 -0500
commitacf22013abc9b4e5ae317d5ad1558504da522a04 (patch)
treee9c8dbe137dff903f88ea4c058529ae66c0ff43d
parent853d53ec6d5413b5811e3627ee41bed49c912416 (diff)
downloadeclipse.pde.build-acf22013abc9b4e5ae317d5ad1558504da522a04.zip
eclipse.pde.build-acf22013abc9b4e5ae317d5ad1558504da522a04.tar.gz
eclipse.pde.build-acf22013abc9b4e5ae317d5ad1558504da522a04.tar.xz
Bug 530218 - 147 junit failures in PDE build with java 9
Change-Id: Ic52b026e3e261ee7180c2255fd4735b480c22230 Signed-off-by: Vikas Chandra <Vikas.Chandra@in.ibm.com>
-rw-r--r--org.eclipse.pde.build.tests/src/org/eclipse/pde/build/tests/BuildConfiguration.java21
1 files changed, 20 insertions, 1 deletions
diff --git a/org.eclipse.pde.build.tests/src/org/eclipse/pde/build/tests/BuildConfiguration.java b/org.eclipse.pde.build.tests/src/org/eclipse/pde/build/tests/BuildConfiguration.java
index 332ec96..6b51f69 100644
--- a/org.eclipse.pde.build.tests/src/org/eclipse/pde/build/tests/BuildConfiguration.java
+++ b/org.eclipse.pde.build.tests/src/org/eclipse/pde/build/tests/BuildConfiguration.java
@@ -43,7 +43,26 @@ public class BuildConfiguration {
defaultBuildConfig.put("basews", Platform.getWS());
defaultBuildConfig.put("basearch", Platform.getOSArch());
defaultBuildConfig.put("filterP2Base", TRUE);
- defaultBuildConfig.put("bootclasspath", System.getProperty("sun.boot.class.path"));
+
+ String version = System.getProperty("java.specification.version"); //$NON-NLS-1$
+ boolean isJava9OrGreater = false;
+ if (version != null) {
+ String[] nums = version.split("\\."); //$NON-NLS-1$
+ if (nums.length == 1) {
+ // java 9 and above
+ try {
+ int major = Integer.parseInt(nums[0]);
+ if (major >= 9) {
+ isJava9OrGreater = true;
+ }
+
+ } catch (NumberFormatException e) {
+ }
+ }
+ }
+ if (isJava9OrGreater == false)
+ defaultBuildConfig.put("bootclasspath", System.getProperty("sun.boot.class.path"));
+
defaultScriptConfig = (Properties) defaultBuildConfig.clone();
if (!defaultBuildConfig.containsKey("configs"))
defaultScriptConfig.put("configs", "*,*,*");