Correction to previous commit: could not call a subroutine from a BEGIN block (in this case, could not call the new get_java_command() subroutine). But as subroutines in other files that are included can be called from BEGIN, I've added get_java_command as a utility function in GS' perllib/util.pm and this now gets called instead.