From 854a40d87fed9b0b9a619856e62828c7948124d6 Mon Sep 17 00:00:00 2001 From: Maksymilian Pawlak <120831+m4ksio@users.noreply.github.com> Date: Tue, 27 Feb 2018 11:48:25 +0000 Subject: [PATCH] [Corda-1116] Classpath as env (#2652) * Move classpath to a system variable so it can overcome command limits on Windows, while keep working fine on other system. --- .../kotlin/net/corda/testing/node/internal/ProcessUtilities.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/ProcessUtilities.kt b/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/ProcessUtilities.kt index 6354cde0d0..3bf5e29f4b 100644 --- a/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/ProcessUtilities.kt +++ b/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/ProcessUtilities.kt @@ -44,13 +44,12 @@ object ProcessUtilities { if (maximumHeapSize != null) add("-Xmx$maximumHeapSize") add("-XX:+UseG1GC") addAll(extraJvmArguments) - add("-cp") - add(classpath) add(className) addAll(arguments) } return ProcessBuilder(command).apply { inheritIO() + environment().put("CLASSPATH", classpath) if (workingDirectory != null) { redirectError((workingDirectory / "$className.stderr.log").toFile()) redirectOutput((workingDirectory / "$className.stdout.log").toFile())