Call "java[c] -version" only once
Call "java[c] -version" only once

and print out the full output if error occurs.
Bug: 11672548

Change-Id: Iba217789f7ab69d73902a4dc82e8975b2f6a48fc

xorware/android_build,xorware/android_build,xorware/android_build,xorware/android_build,xorware/android_build