[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.
This commit is contained in:
Maksymilian Pawlak 2018-02-27 11:48:25 +00:00 committed by GitHub
parent 3066926f0f
commit 854a40d87f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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