Add safety check for JDK 8 on non-Oracle