Workaround JVM suprocess api limitations

(see comment in code)