Fix java version detection

Change-Id: I08b3cd0e2839fcc960e42e00ddb03ef46cfe12ae