with Java 8 released need to switch java.version checking around for proper close method calling