When I run using Java 8, calling dispose() causes the JVM to crash. My project is developed with Java 8, and I need it to support Java 8.