Checks that the right version of Java is used
Sets the ANT_OPTS needed for a clean Scala build