mirror of
https://github.com/corda/corda.git
synced 2025-01-18 18:56:28 +00:00
[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:
parent
3066926f0f
commit
854a40d87f
@ -44,13 +44,12 @@ object ProcessUtilities {
|
|||||||
if (maximumHeapSize != null) add("-Xmx$maximumHeapSize")
|
if (maximumHeapSize != null) add("-Xmx$maximumHeapSize")
|
||||||
add("-XX:+UseG1GC")
|
add("-XX:+UseG1GC")
|
||||||
addAll(extraJvmArguments)
|
addAll(extraJvmArguments)
|
||||||
add("-cp")
|
|
||||||
add(classpath)
|
|
||||||
add(className)
|
add(className)
|
||||||
addAll(arguments)
|
addAll(arguments)
|
||||||
}
|
}
|
||||||
return ProcessBuilder(command).apply {
|
return ProcessBuilder(command).apply {
|
||||||
inheritIO()
|
inheritIO()
|
||||||
|
environment().put("CLASSPATH", classpath)
|
||||||
if (workingDirectory != null) {
|
if (workingDirectory != null) {
|
||||||
redirectError((workingDirectory / "$className.stderr.log").toFile())
|
redirectError((workingDirectory / "$className.stderr.log").toFile())
|
||||||
redirectOutput((workingDirectory / "$className.stdout.log").toFile())
|
redirectOutput((workingDirectory / "$className.stdout.log").toFile())
|
||||||
|
Loading…
Reference in New Issue
Block a user