IClasspathEntry entry;
IClasspathEntry entry= null;
	public static void addJUnitToBuildPath(Shell shell, IJavaProject project) throws JavaModelException {		IProject junitProject= ResourcesPlugin.getWorkspace().getRoot().getProject("org.junit"); //$NON-NLS-1$		IClasspathEntry entry;		if (junitProject.exists()) {			entry= JavaCore.newProjectEntry(junitProject.getFullPath());		} else {			IPath junitHome= new Path(JUnitPlugin.JUNIT_HOME);			IPath sourceHome= new Path("ECLIPSE_HOME"); //$NON-NLS-1$			entry= JavaCore.newVariableEntry(				junitHome.append("junit.jar"),   //$NON-NLS-1$				//TODO: find a better solution than declaring a classpath variable				sourceHome.append("plugins/org.eclipse.jdt.source_3.1.0/src/org.junit_3.8.1/junitsrc.zip"),  //$NON-NLS-1$				null			);		}		addToClasspath(shell, project, entry);	}	