return;
}
Thread thread = Thread.currentThread();
ClassLoader initialTCCL = thread.getContextClassLoader();
ImageInputStream testStream = null;
try {
ClassLoader systemCL = ClassLoader.getSystemClassLoader();
thread.setContextClassLoader(systemCL);
// set in-memory caching ImageIO
ImageIO.setUseCache(false);
// force Disposer/AWT threads initialization
testStream = ImageIO.createImageInputStream(new ByteArrayInputStream(new byte[0]));
Toolkit.getDefaultToolkit().getSystemEventQueue();
} catch (IOException e) {
LOGGER.error(e.getMessage(), e);
} finally {
if (testStream != null) {
try {
testStream.close();
} catch (IOException e) {
LOGGER.error(e.getMessage(), e);
}
}