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); }