Bundle bundle= Platform.getBundle("org.junit"); if (bundle == null) { JavaCore.removeClasspathVariable(JUnitPlugin.JUNIT_HOME, null); return; } URL installLocation= bundle.getEntry("/"); URL local= null; try { local= Platform.asLocalURL(installLocation); } catch (IOException e) { JavaCore.removeClasspathVariable(JUnitPlugin.JUNIT_HOME, null); return; } try { String fullPath= new File(local.getPath()).getAbsolutePath(); JavaCore.setClasspathVariable(JUnitPlugin.JUNIT_HOME, Path.fromOSString(fullPath), null); } catch (JavaModelException e1) { JavaCore.removeClasspathVariable(JUnitPlugin.JUNIT_HOME, null);
if (JUnitPlugin.JUNIT_HOME.equals(variable)) { initializeHome(); } else if (JUnitPlugin.JUNIT_SRC_HOME.equals(variable)) { initializeSource();
	public void initialize(String variable) {		Bundle bundle= Platform.getBundle("org.junit"); //$NON-NLS-1$		if (bundle == null) {			JavaCore.removeClasspathVariable(JUnitPlugin.JUNIT_HOME, null);			return;		}		URL installLocation= bundle.getEntry("/"); //$NON-NLS-1$		URL local= null;		try {			local= Platform.asLocalURL(installLocation);		} catch (IOException e) {			JavaCore.removeClasspathVariable(JUnitPlugin.JUNIT_HOME, null);			return;		}		try {			String fullPath= new File(local.getPath()).getAbsolutePath();			JavaCore.setClasspathVariable(JUnitPlugin.JUNIT_HOME, Path.fromOSString(fullPath), null);		} catch (JavaModelException e1) {			JavaCore.removeClasspathVariable(JUnitPlugin.JUNIT_HOME, null);		}	}