Method getContextClassLoader = Thread.class.getMethod("getContextClassLoader", null);
ClassLoader parent = null;  String type = FrameworkProperties.getProperty(PROP_CONTEXTCLASSLOADER_PARENT); if (CONTEXTCLASSLOADER_PARENT_APP.equals(type)) parent = ClassLoader.getSystemClassLoader(); else if (CONTEXTCLASSLOADER_PARENT_BOOT.equals(type)) parent = null; else if (CONTEXTCLASSLOADER_PARENT_FWK.equals(type)) parent = EclipseStarter.class.getClassLoader(); else if (CONTEXTCLASSLOADER_PARENT_EXT.equals(type)) { ClassLoader appCL = ClassLoader.getSystemClassLoader(); if (appCL != null) parent = appCL.getParent(); } else { Method getContextClassLoader = Thread.class.getMethod("getContextClassLoader", null); parent = (ClassLoader) getContextClassLoader.invoke(current, null); }
	private static void initializeContextFinder() {		Thread current = Thread.currentThread();		try {			Method getContextClassLoader = Thread.class.getMethod("getContextClassLoader", null); //$NON-NLS-1$			Method setContextClassLoader = Thread.class.getMethod("setContextClassLoader", new Class[] {ClassLoader.class}); //$NON-NLS-1$			Object[] params = new Object[] {new ContextFinder((ClassLoader) getContextClassLoader.invoke(current, null))};			setContextClassLoader.invoke(current, params);			return;		} catch (SecurityException e) {			//Ignore		} catch (NoSuchMethodException e) {			//Ignore		} catch (IllegalArgumentException e) {			//Ignore		} catch (IllegalAccessException e) {			//Ignore		} catch (InvocationTargetException e) {			//Ignore		}		FrameworkLogEntry entry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, NLS.bind(EclipseAdaptorMsg.ECLIPSE_CLASSLOADER_CANNOT_SET_CONTEXTFINDER, null), 0, null, null);		log.log(entry);	}