Fixes crash in NetBeans Gradle when using JDK8

This will fix the compiler throwing an unhandled exception when building/running with the Gradle Support plug-in for NetBeans and you only have the latest JDK installed.