Add version matching code for JRE 9