public static void setPreferredClassLoader(ClassLoader classLoader) {
		if (classLoader != dynamicLoader) {
			dynamicLoader = classLoader;
			final Thread[] threads = new Thread[Thread.activeCount()];
			Thread.enumerate(threads);
			for (final Thread t : threads) {
				if (t != null) {
					t.setContextClassLoader(classLoader);
				}
			}
		}
	}
public static void setPreferredClassLoader ( ClassLoader classLoader ) { if ( classLoader != dynamicLoader ) { dynamicLoader = classLoader ; final Thread [ ] threads = new Thread [ Thread . activeCount ( ) ] ; Thread . enumerate ( threads ) ; for ( final Thread t : threads ) { if ( t != null ) { t . setContextClassLoader ( classLoader ) ; } } } }
Set the preferred class loader.

@param classLoader is the preferred class loader