Use CLASSPATH env var to configure child permutation workers This fixes a bug in windows where too long of arguments prevents the process from being able to start. Bug-Link: https://github.com/gwtproject/gwt/issues/9701 Bug: #9701 Change-Id: I572487e682ceae070878e76ae0dd29a771ef1dad
diff --git a/dev/core/src/com/google/gwt/dev/ExternalPermutationWorkerFactory.java b/dev/core/src/com/google/gwt/dev/ExternalPermutationWorkerFactory.java index b6d4573..bcb56f5 100644 --- a/dev/core/src/com/google/gwt/dev/ExternalPermutationWorkerFactory.java +++ b/dev/core/src/com/google/gwt/dev/ExternalPermutationWorkerFactory.java
@@ -261,8 +261,7 @@ String cookie = StringUtils.toHexString(cookieBytes); // Cook up the classpath, main class, and extra args - args.addAll(Arrays.asList("-classpath", - ManagementFactory.getRuntimeMXBean().getClassPath(), + args.addAll(Arrays.asList( CompilePermsServer.class.getName(), "-host", "localhost", "-port", String.valueOf(port), "-logLevel", logLevel.toString(), "-cookie", cookie)); @@ -276,6 +275,7 @@ } ProcessBuilder builder = new ProcessBuilder(); + builder.environment().put("CLASSPATH", ManagementFactory.getRuntimeMXBean().getClassPath()); builder.command(args); try {