CORDA-1116 - Move classpath to a system variable so it can overcome command limits on Windows, while keep working fine on other system. (#2660)

(cherry picked from commit 30e2c7d)
This commit is contained in:
Maksymilian Pawlak 2018-02-28 08:37:30 +00:00 committed by Katelyn Baker
parent f03ce2b645
commit 78dbb96089

View File

@ -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())