Java Output script catch-up

* Just catching up the Java version of the Output script to match the
latest standalone version.