fix java 1.8 detection