bugfix coredumps when checking java version