Custom Java version detection