8019583: [TESTBUG] runtime/7107135 always passes
Summary: If java test return none zero, the value will be override by 'if' statement, the exit value will always '0' and pass. Fix by recording the result in a variable.
Reviewed-by: coleenp, dholmes, iklam
Contributed-by: yumin.qi@oracle.com