From c737f55aabcfd3a00288ca6b33de392fe074e978 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Thu, 20 Jan 2011 08:25:35 +0000 Subject: [PATCH] Give build.sysclasspath a chance to influence a forked VM's bootclasspath even if the user didn't supply one herself git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1061156 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tools/ant/types/CommandlineJava.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/org/apache/tools/ant/types/CommandlineJava.java b/src/main/org/apache/tools/ant/types/CommandlineJava.java index 921eebd81..db3bfd894 100644 --- a/src/main/org/apache/tools/ant/types/CommandlineJava.java +++ b/src/main/org/apache/tools/ant/types/CommandlineJava.java @@ -678,13 +678,14 @@ public class CommandlineJava implements Cloneable { + "the target VM doesn't support it."); } } else { - if (bootclasspath != null) { - return bootclasspath.concatSystemBootClasspath(isCloneVm() - ? "last" - : "ignore"); - } else if (isCloneVm()) { - return Path.systemBootClasspath; + Path b = bootclasspath; + if (b == null) { + b = new Path(null); } + // even with no user-supplied bootclasspath + // build.sysclasspath could be set to something other than + // "ignore" and thus create one + return b.concatSystemBootClasspath(isCloneVm() ? "last" : "ignore"); } return new Path(null); }