protected String createClassPath() {
		URLClassLoader serverClassLoader;
		URLClassLoader taskletClassLoader;
		try {
			serverClassLoader = (URLClassLoader) Class.forName("org.springframework.xd.dirt.core.Job").getClassLoader();
			taskletClassLoader = (URLClassLoader) taskletClass.getClassLoader();
		}
		catch (Exception e) {
			throw new IllegalStateException("Unable to determine classpath from ClassLoader.", e);
		}
		if (serverClassLoader == null) {
			throw new IllegalStateException("Unable to access ClassLoader for " + taskletClass + ".");
		}
		if (taskletClassLoader == null) {
			throw new IllegalStateException("Unable to access Context ClassLoader.");
		}
		List<String> classPath = new ArrayList<String>();
		String configHome = environment.getProperty(XD_CONFIG_HOME);
		if (StringUtils.hasText(configHome)) {
			classPath.add(configHome);
		}
		for (URL url : serverClassLoader.getURLs()) {
			String file = url.getFile().split("\\!/", 2)[0];
			if (file.endsWith(".jar")) {
				classPath.add(file);
			}
		}
		for (URL url : taskletClassLoader.getURLs()) {
			String file = url.getFile().split("\\!/", 2)[0];
			if (file.endsWith(".jar") && !classPath.contains(file)) {
				classPath.add(file);
			}
		}
		StringBuilder classPathBuilder = new StringBuilder();
		String separator = System.getProperty("path.separator");
		for (String url : classPath) {
			if (classPathBuilder.length() > 0) {
				classPathBuilder.append(separator);
			}
			classPathBuilder.append(url);
		}
		return classPathBuilder.toString();
	}
@since 1.2
@author Thomas Risberg
@author Gary Russell
extensions/spring-xd-extension-batch/src/main/java/org/springframework/batch/step/tasklet/x/ClasspathEnvironmentProvider.java