final Thread asThread = (Thread) original; if (asThread.getState() != Thread.State.NEW) { throw error("Detected a started Thread in the image heap. " + "Threads running in the image generator are no longer running at image run time. "); throw error("Detected a FileDescriptor in the image heap. " + "File descriptors opened during image generation are no longer open at image run time, and the files might not even be present anymore at image run time. "); if (buffer.capacity() != 0 || getFileDescriptor(buffer) != null) { throw error("Detected a direct/mapped ByteBuffer in the image heap. " + "A direct ByteBuffer has a pointer to unmanaged C memory, and C memory from the image generator is not available at image run time. " + "A mapped ByteBuffer references a file descriptor, which is no longer open and mapped at run time. "); throw error("Detected a ZipFile object in the image heap. " + "A ZipFile object contains pointers to unmanaged C memory and file descriptors, and these resources are no longer available at image run time. ");