invoking 'java' by itself exits with a nonzero error code

instead, invoke `java -version` to see if java exists