checking java version differently