void () { // clear classes with invalid classloader from UIManager cache final UIDefaults uiDefaults = UIManager.getDefaults(); for (Iterator it = uiDefaults.keySet().iterator(); it.hasNext();) { Object key = it.next(); Object value = uiDefaults.get(key); if (value instanceof Class) { ClassLoader loader = ((Class<?>)value).getClassLoader(); if (loader instanceof DesignTimeClassLoader) { it.remove(); } } } myModule2ClassLoader.clear(); myProjectClassLoader = null; }