11-17-2011 10:11 AM
public static Class<?> loadClass(String className) {
   Class<?> clazz = null;
   ClassLoader classLoader = getCustomClassLoader();
   
   // First exception in chain of classloaders will be used as cause when no class is found in any of them
   Throwable throwable = null;
   
   if(classLoader != null) {
     try {
       LOG.finest("Trying to load class with custom classloader: " + className);
            clazz = Class.forName(className, true, classLoader);
     } catch(Throwable t) {
       throwable = t;
     }
   }
…
clazz = Class.forName(className, true, classLoader);clazz = classLoader.loadClass(className);11-21-2011 04:51 AM
11-22-2011 05:45 AM
11-23-2011 09:34 AM
clazz = classLoader.loadClass(className);the method loadClass of my classLoader is called every time loadClass in ReflectUtil was called - which is the way I want to achieveclazz = Class.forName(className, true, classLoader);it is done only for the first time the class is loaded11-28-2011 01:11 AM
11-28-2011 06:04 AM
 
					
				
			
			
				
			
			
			
			
			
			
			
		 
					
				
		
08-13-2014 03:33 AM
08-19-2014 05:28 AM
 
					
				
		
08-19-2014 10:36 AM
08-20-2014 02:46 PM
 
					
				
				
			
		
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.