JDK 6 compatibility - ReflectiveOperationException replaced