(Java) Add Automake conditionals and CPP #defines for JDK versions