Upstream go catchup (Arguments, JSON output etc.)

This patchset lifts the Java version to the same feature set level as the C++ and Go version.