[471114] Use loaded classes to configure JavaClasspath
diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/AbstractCompilerChain.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/AbstractCompilerChain.java
index 2886b04..8cecc99 100644
--- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/AbstractCompilerChain.java
+++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/AbstractCompilerChain.java
@@ -19,12 +19,13 @@
 import java.util.List;
 import java.util.Map;
 
+import javax.tools.JavaFileObject;
+
 import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
 import org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage;
 import org.eclipse.emf.common.util.URI;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EStructuralFeature.Setting;
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
 import org.eclipse.emf.ecore.resource.Resource;
 import org.eclipse.emf.ecore.resource.ResourceSet;
 import org.eclipse.emf.ecore.resource.URIConverter;
@@ -32,7 +33,9 @@
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
 import org.eclipse.ocl.examples.codegen.dynamic.ExplicitClassLoader;
+import org.eclipse.ocl.examples.codegen.dynamic.JavaClasspath;
 import org.eclipse.ocl.examples.codegen.dynamic.JavaFileUtil;
+import org.eclipse.ocl.examples.codegen.dynamic.OCL2JavaFileObject;
 import org.eclipse.ocl.pivot.Model;
 import org.eclipse.ocl.pivot.internal.manager.MetamodelManagerInternal;
 import org.eclipse.ocl.pivot.utilities.ClassUtil;
@@ -43,7 +46,6 @@
 import org.eclipse.qvtd.compiler.internal.qvtc2qvtu.QVTc2QVTu;
 import org.eclipse.qvtd.compiler.internal.qvtc2qvtu.QVTuConfiguration;
 import org.eclipse.qvtd.compiler.internal.qvtm2qvts.QVTm2QVTs;
-import org.eclipse.qvtd.compiler.internal.qvtr2qvtc.QVTr2QVTc;
 import org.eclipse.qvtd.compiler.internal.qvts2qvti.QVTs2QVTi;
 import org.eclipse.qvtd.compiler.internal.qvts2qvts.QVTs2QVTs;
 import org.eclipse.qvtd.compiler.internal.qvtu2qvtm.QVTu2QVTm;
@@ -107,12 +109,12 @@
 		}
 
 		public @NonNull Class<? extends Transformer> execute(@NonNull URI txURI, @NonNull JavaResult javaResult) throws Exception {
-			List<@NonNull String> classPathProjectNames = basicGetOption(CLASS_PROJECT_NAMES_KEY);
+			JavaClasspath classpath = basicGetOption(CLASSPATH_KEY);
 			URIConverter uriConverter = compilerChain.getEnvironmentFactory().getResourceSet().getURIConverter();
 			assert uriConverter != null;
 			//			System.out.println("classPathProjectNames = " + classPathProjectNames);
-			List<@NonNull String> classpathProjects;
-			if (EcorePlugin.IS_ECLIPSE_RUNNING) {
+			// List<@NonNull String> classpathProjects;
+			/*	if (EcorePlugin.IS_ECLIPSE_RUNNING) {
 				URI classFileURI = compilerChain.basicGetOption(QVTrCompilerChain.CLASS_STEP, QVTrCompilerChain.URI_KEY);
 				assert classFileURI != null;
 				String classFilePath2 = classFileURI.toFileString();
@@ -122,10 +124,14 @@
 				classpathProjects = CompilerUtil.createClassPathProjectList(uriConverter, binProjectName, classFilePath2, classPathProjectNames);
 			}
 			else {
-				classpathProjects = classPathProjectNames != null ? JavaFileUtil.createClassPathProjectList(uriConverter, classPathProjectNames) : null;
-			}
+				classpathProjects = classpath;
+			} */
+			//			URI platformURI = URI.createPlatformResourceURI(compilerChain.get, true);
+			//			URI pathURI = environmentFactory.getResourceSet().getURIConverter().normalize(platformURI);
 			//			System.out.println("classpathProjects = " + classpathProjects);
-			String problemMessage = JavaFileUtil.compileClass(javaResult.qualifiedClassName, javaResult.code, javaResult.classPath, classpathProjects);
+			JavaFileObject compilationUnit = new OCL2JavaFileObject(javaResult.qualifiedClassName, javaResult.code);
+			List<@NonNull JavaFileObject> compilationUnits = Collections.singletonList(compilationUnit);
+			String problemMessage = JavaFileUtil.compileClasses(compilationUnits, javaResult.qualifiedClassName, javaResult.classPath, classpath);
 			if (problemMessage != null) {
 				throw new CompilerChainException(problemMessage);
 			}
diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/CompilerChain.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/CompilerChain.java
index b6eb933..f0d1943 100644
--- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/CompilerChain.java
+++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/CompilerChain.java
@@ -12,7 +12,6 @@
 
 import java.io.IOException;
 import java.util.Collection;
-import java.util.List;
 import java.util.Map;
 
 import org.eclipse.emf.codegen.ecore.genmodel.GenPackage;
@@ -20,6 +19,7 @@
 import org.eclipse.emf.ecore.resource.Resource;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.ocl.examples.codegen.dynamic.JavaClasspath;
 import org.eclipse.qvtd.pivot.qvtbase.utilities.QVTbaseEnvironmentFactory;
 import org.eclipse.qvtd.pivot.qvtimperative.ImperativeTransformation;
 import org.eclipse.qvtd.runtime.evaluation.Transformer;
@@ -60,7 +60,7 @@
 	public static final CompilerOptions.@NonNull Key<@Nullable URI> URI_KEY = new CompilerOptions.Key<>("uri");
 	public static final CompilerOptions.@NonNull Key<Boolean> VALIDATE_KEY = new CompilerOptions.Key<>("validate");
 
-	public static final CompilerOptions.@NonNull Key<@NonNull List<@NonNull String>> CLASS_PROJECT_NAMES_KEY = new CompilerOptions.Key<>("classProjectNames");
+	public static final CompilerOptions.@NonNull Key<@NonNull JavaClasspath> CLASSPATH_KEY = new CompilerOptions.Key<>("classpath");
 
 	public static final CompilerOptions.@NonNull Key<@Nullable String> JAVA_EXTRA_PREFIX_KEY = new CompilerOptions.Key<>("javaExtraPrefix");
 	public static final CompilerOptions.@NonNull Key<@Nullable Boolean> JAVA_GENERATED_DEBUG_KEY = new CompilerOptions.Key<>("javaGeneratedDebug");
diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/DefaultCompilerOptions.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/DefaultCompilerOptions.java
index d6569c1..48504b1 100644
--- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/DefaultCompilerOptions.java
+++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/DefaultCompilerOptions.java
@@ -13,7 +13,6 @@
 import java.io.IOException;
 import java.util.Collection;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 
 import org.eclipse.core.resources.IFile;
@@ -22,6 +21,7 @@
 import org.eclipse.emf.ecore.xmi.XMLResource;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.ocl.examples.codegen.dynamic.JavaClasspath;
 import org.eclipse.ocl.pivot.resource.ASResource;
 import org.eclipse.ocl.pivot.utilities.URIUtil;
 import org.eclipse.qvtd.compiler.internal.utilities.CompilerUtil;
@@ -55,7 +55,9 @@
 	}
 
 	private void setClassStepOptions(@NonNull String projectName, @NonNull URI classURI) throws IOException {
-		setOption(CompilerChain.CLASS_STEP, CompilerChain.CLASS_PROJECT_NAMES_KEY, CompilerUtil.createClasspathProjectNameList(projectName));
+		JavaClasspath classpath = CompilerUtil.createDefaultQVTiClasspath();
+		//	classpath.add(projectName); -- only used for QVTd launches -- ?? OSGI only ?? -- ?? project will be added later ??
+		setOption(CompilerChain.CLASS_STEP, CompilerChain.CLASSPATH_KEY, classpath);
 		IFile classFiles = URIUtil.getResolvedFile(classURI);
 		if (classFiles != null) {
 			setOption(CompilerChain.CLASS_STEP, CompilerChain.URI_KEY, URI.createFileURI(classFiles.getLocation().toString()));
@@ -70,11 +72,11 @@
 		setOption(CompilerChain.QVTS_STEP, CompilerChain.SCHEDULER_YED_GRAPHS, yedGraphs);
 	}
 
-	public void setGenerateClassesOptions(@NonNull URI srcFileURI, @NonNull URI binFileURI, @NonNull List<@NonNull String> projectNames, boolean isIncremental) {
+	public void setGenerateClassesOptions(@NonNull URI srcFileURI, @NonNull URI binFileURI, @NonNull JavaClasspath classpath, boolean isIncremental) {
 		setOption(CompilerChain.JAVA_STEP, CompilerChain.URI_KEY, srcFileURI);
 		setOption(CompilerChain.JAVA_STEP, CompilerChain.JAVA_INCREMENTAL_KEY, isIncremental);
 		setOption(CompilerChain.JAVA_STEP, CompilerChain.JAVA_GENERATED_DEBUG_KEY, true);
-		setOption(CompilerChain.CLASS_STEP, CompilerChain.CLASS_PROJECT_NAMES_KEY, projectNames);
+		setOption(CompilerChain.CLASS_STEP, CompilerChain.CLASSPATH_KEY, classpath);
 		setOption(CompilerChain.CLASS_STEP, CompilerChain.URI_KEY, binFileURI);
 	}
 
diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/GenModelGenerateCompilerStep.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/GenModelGenerateCompilerStep.java
index 9d318ee..3b94272 100644
--- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/GenModelGenerateCompilerStep.java
+++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/GenModelGenerateCompilerStep.java
@@ -18,6 +18,8 @@
 import java.util.List;
 import java.util.Set;
 
+import javax.tools.JavaFileObject;
+
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IFolder;
 import org.eclipse.core.resources.IProject;
@@ -36,10 +38,10 @@
 import org.eclipse.emf.ecore.plugin.EcorePlugin;
 import org.eclipse.emf.ecore.resource.Resource;
 import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.ocl.examples.codegen.dynamic.JavaClasspath;
 import org.eclipse.ocl.examples.codegen.dynamic.JavaFileUtil;
 import org.eclipse.ocl.examples.codegen.genmodel.OCLGenModelUtil;
 import org.eclipse.qvtd.compiler.internal.qvtr2qvtc.QVTr2QVTc;
-import org.eclipse.qvtd.compiler.internal.utilities.CompilerUtil;
 
 /**
  * GenModelCompilerStep activates the EMF GenModel tooling to generate the Java classes from the
@@ -98,7 +100,7 @@
 		Resource genmodelResource = environmentFactory.getResourceSet().getResource(genmodelURI, true);
 		assert genmodelResource != null;
 		GenModel genModel = (GenModel) genmodelResource.getContents().get(0);
-		List<@NonNull String> classProjectNames = compilerChain.basicGetOption(QVTrCompilerChain.CLASS_STEP, QVTrCompilerChain.CLASS_PROJECT_NAMES_KEY);
+		JavaClasspath classpath = compilerChain.basicGetOption(QVTrCompilerChain.CLASS_STEP, QVTrCompilerChain.CLASSPATH_KEY);
 		URI classFileURI = compilerChain.basicGetOption(QVTrCompilerChain.CLASS_STEP, QVTrCompilerChain.URI_KEY);
 		URI traceURI = compilerChain.getURI(QVTrCompilerChain.TRACE_STEP, QVTrCompilerChain.URI_KEY);
 		if (classFileURI != null) {
@@ -106,7 +108,7 @@
 			//			File zbinFile;
 			String classFilePath;
 			String sourceFilePathPrefix;
-			List<@NonNull String> classpathProjects;
+			//	List<@NonNull String> classpathProjects;
 			if (EcorePlugin.IS_ECLIPSE_RUNNING) {
 				IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
 				IProject binProject = root.getProject(binProjectName);
@@ -116,10 +118,10 @@
 				IFile genIFile = root.getFile(new Path(genModel.getModelDirectory()));
 				File genFile = URIUtil.toFile(genIFile.getLocationURI());
 				sourceFilePathPrefix = genFile.getAbsolutePath().replace("\\", "/");
-				if (classProjectNames == null) {
-					classProjectNames = CompilerUtil.createClasspathProjectNameList(binProjectName);
-				}
-				classpathProjects = JavaFileUtil.createClassPathProjectList(environmentFactory.getResourceSet().getURIConverter(), classProjectNames);
+				//	if (classpath == null) {
+				//		classpath = CompilerUtil.createClasspathProjectNameList(binProjectName);
+				//	}
+				//	classpathProjects = null;//JavaFileUtil.createClassPathProjectList(environmentFactory.getResourceSet().getURIConverter(), classProjectNames);
 			}
 			else {
 				//				ResourceSet resourceSet = environmentFactory.getResourceSet();
@@ -129,7 +131,7 @@
 				//				binFile = new File(objectPath);
 				URI genModelDirectoryURI = URI.createPlatformResourceURI(genModel.getModelDirectory(), true);
 				sourceFilePathPrefix = environmentFactory.getResourceSet().getURIConverter().normalize(genModelDirectoryURI).toFileString() + "/";
-				classpathProjects = null;
+				//	classpathProjects = null;
 			}
 			assert classFilePath != null;
 			if (keepOldJavaFiles != Boolean.TRUE) {
@@ -141,18 +143,20 @@
 			}
 			generateModels(genModel);
 			new File(classFilePath).mkdirs();
+			List<@NonNull JavaFileObject> compilationUnits = new ArrayList<@NonNull JavaFileObject>();
 			Set<@NonNull String> basePackages = new HashSet<>();
 			for (GenPackage genPackage : genModel.getGenPackages()) {
 				String basePackage = genPackage.getBasePackage();
 				basePackage = basePackage != null ? ("/" + basePackage.replace(".", "/")) : "";
 				if (basePackages.add(basePackage)) {
 					String sourceFilePath = sourceFilePathPrefix + basePackage;
-					String problemMessage = JavaFileUtil.compileClasses(sourceFilePath, classFilePath, classpathProjects);
-					if (problemMessage != null) {
-						addProblem(new CompilerChainException(problemMessage));
-					}
+					JavaFileUtil.gatherCompilationUnits(compilationUnits, new File(sourceFilePath));
 				}
 			}
+			String problemMessage = JavaFileUtil.compileClasses(compilationUnits, sourceFilePathPrefix, classFilePath, classpath);
+			if (problemMessage != null) {
+				addProblem(new CompilerChainException(problemMessage));
+			}
 		}
 		throwCompilerChainExceptionForErrors();
 		compiled(genmodelResource);
diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/utilities/CompilerUtil.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/utilities/CompilerUtil.java
index 0772bd0..4497448 100644
--- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/utilities/CompilerUtil.java
+++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/utilities/CompilerUtil.java
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.qvtd.compiler.internal.utilities;
 
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -26,15 +27,14 @@
 import org.eclipse.emf.ecore.EReference;
 import org.eclipse.emf.ecore.EStructuralFeature.Setting;
 import org.eclipse.emf.ecore.impl.BasicEObjectImpl;
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
 import org.eclipse.emf.ecore.resource.Resource;
 import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.URIConverter;
 import org.eclipse.emf.ecore.util.Diagnostician;
 import org.eclipse.emf.ecore.util.EcoreUtil.UnresolvedProxyCrossReferencer;
 import org.eclipse.emf.ecore.xmi.XMLResource;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.ocl.examples.codegen.dynamic.JavaClasspath;
 import org.eclipse.ocl.examples.codegen.dynamic.JavaFileUtil;
 import org.eclipse.ocl.examples.codegen.generator.CodeGenerator;
 import org.eclipse.ocl.pivot.Element;
@@ -67,8 +67,6 @@
 import org.eclipse.qvtd.pivot.qvtschedule.VerdictRegion;
 import org.eclipse.qvtd.pivot.qvtschedule.utilities.QVTscheduleUtil;
 
-import com.google.common.collect.Lists;
-
 public class CompilerUtil extends QVTscheduleUtil
 {
 	public final static @NonNull Map<Object, Object> defaultSavingOptions;
@@ -192,41 +190,32 @@
 	}
 
 	/**
-	 * Return a new list of project names that need to be on the class path.
+	 * Return a new list of exemplar classes whose projects need to be on the class path.
+	 * @throws IOException
 	 */
-	public static @NonNull List<@NonNull String> createClasspathProjectNameList(@NonNull String... projectNames) {
-		List<@NonNull String> classProjectNames = new ArrayList<>();
-		classProjectNames.add("org.eclipse.qvtd.runtime");
-		classProjectNames.add("org.eclipse.ocl.pivot");
-		classProjectNames.add("org.eclipse.emf.ecore");
-		classProjectNames.add("org.eclipse.emf.common");
-		classProjectNames.add("org.eclipse.jdt.annotation");
-		classProjectNames.add("org.eclipse.osgi");
-		if (projectNames != null) {
-			for (@NonNull String projectName : projectNames) {
-				classProjectNames.add(0, projectName);
-			}
-		}
-		return classProjectNames;
+	public static @NonNull JavaClasspath createDefaultQVTiClasspath() {
+		JavaClasspath classpath = JavaFileUtil.createDefaultOCLClasspath();
+		classpath.addClass(org.eclipse.qvtd.runtime.evaluation.Invocation.class);
+		return classpath;
 	}
 
 	/**
 	 * Return the classpath folders corresponding to the projectNames, except that the projectName uses an explicit and
 	 * possibly irregular classFilePath allowing the current project to use a non-standard 'bin' folder to avoid confusion
 	 * between the test compilation and the auto-build.
-	 */
-	public static @NonNull List<@NonNull String> createClassPathProjectList(@NonNull URIConverter uriConverter, @NonNull String projectName,
-			@NonNull String classFilePath, @Nullable Iterable<@NonNull String> projectNames) {
+	 *
+	public static @NonNull List<@NonNull Class<?>> createClassPathProjectList(@NonNull URIConverter uriConverter, @NonNull Class<?> projectName,
+			@NonNull Class<?> classFilePath, @Nullable Iterable<@NonNull Class<?>> projectNames) {
 		assert EcorePlugin.IS_ECLIPSE_RUNNING;
 		if (projectNames == null) {
 			projectNames = CompilerUtil.createClasspathProjectNameList(projectName);
 		}
-		List<@NonNull String> projectNames2 = Lists.newArrayList(projectNames);
+		List<@NonNull Class<?>> projectNames2 = Lists.newArrayList(projectNames);
 		projectNames2.remove(projectName);
-		List<@NonNull String> classpathProjects = JavaFileUtil.createClassPathProjectList(uriConverter, projectNames2);
+		List<@NonNull Class<?>> classpathProjects = JavaFileUtil.createClassPathProjectList(uriConverter, projectNames2);
 		classpathProjects.add(0, classFilePath);
 		return classpathProjects;
-	}
+	} */
 
 	//
 	//	Ripple the direct from-2-tos to compute and return the transitive from-2-tos closure.
diff --git a/plugins/org.eclipse.qvtd.cs2as.compiler/src/org/eclipse/qvtd/cs2as/compiler/CS2ASJavaCompilerParameters.java b/plugins/org.eclipse.qvtd.cs2as.compiler/src/org/eclipse/qvtd/cs2as/compiler/CS2ASJavaCompilerParameters.java
index a245dc6..0b2132d 100644
--- a/plugins/org.eclipse.qvtd.cs2as.compiler/src/org/eclipse/qvtd/cs2as/compiler/CS2ASJavaCompilerParameters.java
+++ b/plugins/org.eclipse.qvtd.cs2as.compiler/src/org/eclipse/qvtd/cs2as/compiler/CS2ASJavaCompilerParameters.java
@@ -10,17 +10,17 @@
  *******************************************************************************/
 package org.eclipse.qvtd.cs2as.compiler;
 
-import java.util.List;
 import java.util.Map;
 
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.ocl.examples.codegen.dynamic.JavaClasspath;
 
 public interface CS2ASJavaCompilerParameters extends OCL2JavaTxCompilerParams {
 
 	public @Nullable ClassLoader getClassLoader();
 
-	public @Nullable List<@NonNull String> getClassPathProjectNames();
+	public @Nullable JavaClasspath getClasspath();
 
 	/**
 	 * @return the fully qualified name of the lookup resolver class
diff --git a/plugins/org.eclipse.qvtd.cs2as.compiler/src/org/eclipse/qvtd/cs2as/compiler/internal/CS2ASJavaCompilerImpl.java b/plugins/org.eclipse.qvtd.cs2as.compiler/src/org/eclipse/qvtd/cs2as/compiler/internal/CS2ASJavaCompilerImpl.java
index eb2f059..6373fa8 100644
--- a/plugins/org.eclipse.qvtd.cs2as.compiler/src/org/eclipse/qvtd/cs2as/compiler/internal/CS2ASJavaCompilerImpl.java
+++ b/plugins/org.eclipse.qvtd.cs2as.compiler/src/org/eclipse/qvtd/cs2as/compiler/internal/CS2ASJavaCompilerImpl.java
@@ -34,6 +34,7 @@
 import org.eclipse.ocl.examples.codegen.cgmodel.CGVariable;
 import org.eclipse.ocl.examples.codegen.cgmodel.CGVariableExp;
 import org.eclipse.ocl.examples.codegen.cse.GlobalPlace;
+import org.eclipse.ocl.examples.codegen.dynamic.JavaClasspath;
 import org.eclipse.ocl.examples.codegen.dynamic.JavaFileUtil;
 import org.eclipse.ocl.examples.codegen.dynamic.OCL2JavaFileObject;
 import org.eclipse.ocl.examples.codegen.generator.TypeDescriptor;
@@ -448,13 +449,13 @@
 	private @Nullable Log log = null;
 
 	// Copied from QVTiCompilerTest
-	protected Class<? extends CS2ASTransformer> compileTransformation(@NonNull File explicitClassPath, @NonNull QVTiCodeGenerator cg, @Nullable List<@NonNull String> classPathProjectNames, @Nullable ClassLoader classLoader) throws Exception {
+	protected Class<? extends CS2ASTransformer> compileTransformation(@NonNull File explicitClassPath, @NonNull QVTiCodeGenerator cg, @Nullable JavaClasspath classpath, @Nullable ClassLoader classLoader) throws Exception {
 		String qualifiedClassName = cg.getQualifiedName();
 		String javaCodeSource = cg.generateClassFile();
 		//		String problem = OCL2JavaFileObject.saveClass(String.valueOf(explicitClassPath), qualifiedClassName, javaCodeSource, classPathProjectNames);
 		List<@NonNull JavaFileObject> compilationUnits = Collections.singletonList(new OCL2JavaFileObject(qualifiedClassName, javaCodeSource));
-		List<@NonNull String> classpathProjects = classPathProjectNames != null ? JavaFileUtil.createClassPathProjectList(cg.getEnvironmentFactory().getResourceSet().getURIConverter(), classPathProjectNames) : null;
-		String problem = JavaFileUtil.compileClasses(compilationUnits, qualifiedClassName, String.valueOf(explicitClassPath), classpathProjects);
+		// List<@NonNull String> classpathProjects = classPathProjectNames != null ? JavaFileUtil.createClassPathProjectList(cg.getEnvironmentFactory().getResourceSet().getURIConverter(), classpath) : null;
+		String problem = JavaFileUtil.compileClasses(compilationUnits, qualifiedClassName, String.valueOf(explicitClassPath), classpath);
 		if (problem != null) {
 			throw new CompilerChainException(problem);
 		}
@@ -508,7 +509,7 @@
 		}
 		File explicitClassPath = new File(new File(savePath).getParentFile(), JavaFileUtil.TEST_BIN_FOLDER_NAME);
 		explicitClassPath.mkdir();
-		return ClassUtil.nonNullState(compileTransformation(explicitClassPath, cg, params.getClassPathProjectNames(), params.getClassLoader()));
+		return ClassUtil.nonNullState(compileTransformation(explicitClassPath, cg, params.getClasspath(), params.getClassLoader()));
 	}
 
 	public void setLog(@Nullable Log log) {
diff --git a/plugins/org.eclipse.qvtd.cs2as.compiler/src/org/eclipse/qvtd/cs2as/compiler/internal/CS2ASJavaCompilerParametersImpl.java b/plugins/org.eclipse.qvtd.cs2as.compiler/src/org/eclipse/qvtd/cs2as/compiler/internal/CS2ASJavaCompilerParametersImpl.java
index 0b6a5e2..e4699f8 100644
--- a/plugins/org.eclipse.qvtd.cs2as.compiler/src/org/eclipse/qvtd/cs2as/compiler/internal/CS2ASJavaCompilerParametersImpl.java
+++ b/plugins/org.eclipse.qvtd.cs2as.compiler/src/org/eclipse/qvtd/cs2as/compiler/internal/CS2ASJavaCompilerParametersImpl.java
@@ -10,13 +10,12 @@
  *******************************************************************************/
 package org.eclipse.qvtd.cs2as.compiler.internal;
 
-import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.ocl.examples.codegen.dynamic.JavaClasspath;
 import org.eclipse.qvtd.cs2as.compiler.CS2ASJavaCompilerParameters;
 
 public class CS2ASJavaCompilerParametersImpl implements CS2ASJavaCompilerParameters  {
@@ -28,7 +27,7 @@
 	//	private @NonNull String namedElementClassName;
 	private boolean isIncremental = false;
 	private @NonNull Map<@NonNull String, @NonNull String> packageRenameMap = new HashMap<@NonNull String, @NonNull String>();
-	private @Nullable List<@NonNull String> classpathProjectNames = null;
+	private @Nullable JavaClasspath classpath = null;
 	private @Nullable ClassLoader classLoader = null;
 
 
@@ -41,14 +40,6 @@
 		this.lookupResultName = lookupResultClassName;
 	}
 
-	public void addClassPathProjectName(@NonNull String classpathProjectName) {
-		List<@NonNull String> classpathProjectNames2 = classpathProjectNames;
-		if (classpathProjectNames2 == null) {
-			classpathProjectNames = classpathProjectNames2 = new ArrayList<>();
-		}
-		classpathProjectNames2.add(classpathProjectName);
-	}
-
 	/**
 	 * Defines a package rename only from some package to another package.
 	 */
@@ -62,8 +53,8 @@
 	}
 
 	@Override
-	public @Nullable List<@NonNull String> getClassPathProjectNames() {
-		return classpathProjectNames;
+	public @Nullable JavaClasspath getClasspath() {
+		return classpath;
 	}
 
 	/**
@@ -112,6 +103,11 @@
 		this.classLoader = classLoader;
 	}
 
+	public void setClasspath(@NonNull JavaClasspath classpath) {
+		assert this.classpath == null;
+		this.classpath = classpath;
+	}
+
 	@Override
 	public void setIsIncremental(boolean isIncremental) {
 		this.isIncremental = isIncremental;
diff --git a/releng/org.eclipse.qvtd.build/src/org/eclipse/qvtd/build/utilities/CompileQVTrTransformation.java b/releng/org.eclipse.qvtd.build/src/org/eclipse/qvtd/build/utilities/CompileQVTrTransformation.java
index 756ca10..4185761 100644
--- a/releng/org.eclipse.qvtd.build/src/org/eclipse/qvtd/build/utilities/CompileQVTrTransformation.java
+++ b/releng/org.eclipse.qvtd.build/src/org/eclipse/qvtd/build/utilities/CompileQVTrTransformation.java
@@ -11,6 +11,7 @@
 package org.eclipse.qvtd.build.utilities;
 
 import java.io.File;
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 import org.apache.log4j.Logger;
@@ -26,6 +27,7 @@
 import org.eclipse.emf.mwe.core.monitor.ProgressMonitor;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.ocl.examples.codegen.dynamic.JavaClasspath;
 import org.eclipse.ocl.examples.codegen.dynamic.JavaFileUtil;
 import org.eclipse.ocl.examples.xtext.tests.TestFile;
 import org.eclipse.ocl.examples.xtext.tests.TestFileSystem;
@@ -53,8 +55,8 @@
 {
 	protected class MyQVT extends AbstractTestQVT
 	{
-		public MyQVT(@NonNull ProjectManager projectManager, @NonNull String testProjectName, @NonNull URI testBundleURI, @NonNull URI txURI, @NonNull URI intermediateFileNamePrefixURI, @NonNull URI srcFileURI, @NonNull URI binFileURI) {
-			super(projectManager, testProjectName, testBundleURI, txURI, intermediateFileNamePrefixURI, srcFileURI, binFileURI);
+		public MyQVT(@NonNull ProjectManager projectManager, @NonNull TestProject testProject, @NonNull URI testBundleURI, @NonNull URI txURI, @NonNull URI intermediateFileNamePrefixURI, @NonNull URI srcFileURI, @NonNull URI binFileURI) throws IOException {
+			super(projectManager, testProject, testBundleURI, txURI, intermediateFileNamePrefixURI, srcFileURI, binFileURI);
 		}
 
 		@Override
@@ -215,52 +217,56 @@
 
 	@Override
 	public void invokeInternal(WorkflowContext ctx, ProgressMonitor arg1, Issues issues) {
-		configurePlatformResources();
-		EcorePackage.eINSTANCE.getClass();						// Workaround Bug 425841
-		OCLstdlib.install();
-		QVTrelationStandaloneSetup.doSetup();
-		QVTcorePivotStandaloneSetup.doSetup();
-		QVTimperativeStandaloneSetup.doSetup();
-		log.info("Compiling '" + qvtrModel + "'");
-
-		String testProjectName = getTestProjectName();
-		URI testBundleURI = getTestBundleURI();
-		URI txURI = URI.createPlatformResourceURI("/org.eclipse.qvtd.atl/model/ATL2QVTr.qvtr", true);
-		ProjectManager testProjectManager = getTestProjectManager();
-		URI intermediateFileNamePrefixURI = getTestURI("atl2qvtr");
-		URI srcFileURI = getTestFileURI(JavaFileUtil.TEST_SRC_FOLDER_NAME + "/");
-		URI binFileURI = getTestFileURI(JavaFileUtil.TEST_BIN_FOLDER_NAME + "/");
-		MyQVT myQVT = new MyQVT(testProjectManager, testProjectName, testBundleURI, txURI, intermediateFileNamePrefixURI, srcFileURI, binFileURI);
-		myQVT.addClasspathProjectName("org.eclipse.m2m.atl.common");
-		myQVT.addClasspathProjectName("org.eclipse.qvtd.atl");
-		myQVT.addClasspathProjectName("org.eclipse.qvtd.pivot.qvtbase");
-		myQVT.addClasspathProjectName("org.eclipse.qvtd.pivot.qvtrelation");
-		myQVT.addClasspathProjectName("org.eclipse.qvtd.pivot.qvttemplate");
-		myQVT.setCopyright("Copyright (c) 2015, 2017 Willink Transformations and others.\nAll rights reserved. This program and the accompanying materials\nare made available under the terms of the Eclipse Public License v2.0\nwhich accompanies this distribution, and is available at\nhttp://www.eclipse.org/legal/epl-v20.html\n\nContributors:\n  E.D.Willink - Initial API and implementation");
-		//
-		//	Install the GenPackages and ensure that their nsURIs redirect to their *.ecores.
-		//
-		for (@NonNull String usedGenPackage : usedGenPackages2) {
-			int separator = usedGenPackage.indexOf("#");
-			String projectPath = usedGenPackage.substring(0, separator);
-			String genPackageFragment = usedGenPackage.substring(separator+1);
-			GenPackage genPackage = myQVT.addUsedGenPackage(projectPath, genPackageFragment);
-			EPackage ePackage = genPackage.getEcorePackage();
-			String nsURI = ePackage.getNsURI();
-			URI uri = URI.createURI(nsURI);
-			testProjectManager.getPackageDescriptor(uri).configure(myQVT.getResourceSet(), StandaloneProjectMap.LoadFirstStrategy.INSTANCE,
-				StandaloneProjectMap.MapToFirstConflictHandler.INSTANCE);
-			testProjectManager.getPackageDescriptor(uri).configure(myQVT.getMetamodelManager().getASResourceSet(), StandaloneProjectMap.LoadFirstStrategy.INSTANCE,
-				StandaloneProjectMap.MapToFirstConflictHandler.INSTANCE);
-		}
+		MyQVT myQVT = null;
 		try {
+			configurePlatformResources();
+			EcorePackage.eINSTANCE.getClass();						// Workaround Bug 425841
+			OCLstdlib.install();
+			QVTrelationStandaloneSetup.doSetup();
+			QVTcorePivotStandaloneSetup.doSetup();
+			QVTimperativeStandaloneSetup.doSetup();
+			log.info("Compiling '" + qvtrModel + "'");
+
+			TestProject testProject = getTestProject();
+			URI testBundleURI = getTestBundleURI();
+			URI txURI = URI.createPlatformResourceURI("/org.eclipse.qvtd.atl/model/ATL2QVTr.qvtr", true);
+			ProjectManager testProjectManager = getTestProjectManager();
+			URI intermediateFileNamePrefixURI = getTestURI("atl2qvtr");
+			URI srcFileURI = getTestFileURI(JavaFileUtil.TEST_SRC_FOLDER_NAME + "/");
+			URI binFileURI = getTestFileURI(JavaFileUtil.TEST_BIN_FOLDER_NAME + "/");
+			myQVT = new MyQVT(testProjectManager, testProject, testBundleURI, txURI, intermediateFileNamePrefixURI, srcFileURI, binFileURI);
+			JavaClasspath classpath = myQVT.getClasspath();
+			classpath.addClass(org.eclipse.m2m.atl.common.ATLLaunchConstants.class);
+			classpath.addClass(org.eclipse.qvtd.atl.atl2qvtr.ATL2QVTr.class);
+			classpath.addClass(org.eclipse.qvtd.pivot.qvtbase.BaseModel.class);
+			classpath.addClass(org.eclipse.qvtd.pivot.qvtrelation.RelationModel.class);
+			classpath.addClass(org.eclipse.qvtd.pivot.qvttemplate.TemplateExp.class);
+			myQVT.setCopyright("Copyright (c) 2015, 2017 Willink Transformations and others.\nAll rights reserved. This program and the accompanying materials\nare made available under the terms of the Eclipse Public License v2.0\nwhich accompanies this distribution, and is available at\nhttp://www.eclipse.org/legal/epl-v20.html\n\nContributors:\n  E.D.Willink - Initial API and implementation");
+			//
+			//	Install the GenPackages and ensure that their nsURIs redirect to their *.ecores.
+			//
+			for (@NonNull String usedGenPackage : usedGenPackages2) {
+				int separator = usedGenPackage.indexOf("#");
+				String projectPath = usedGenPackage.substring(0, separator);
+				String genPackageFragment = usedGenPackage.substring(separator+1);
+				GenPackage genPackage = myQVT.addUsedGenPackage(projectPath, genPackageFragment);
+				EPackage ePackage = genPackage.getEcorePackage();
+				String nsURI = ePackage.getNsURI();
+				URI uri = URI.createURI(nsURI);
+				testProjectManager.getPackageDescriptor(uri).configure(myQVT.getResourceSet(), StandaloneProjectMap.LoadFirstStrategy.INSTANCE,
+					StandaloneProjectMap.MapToFirstConflictHandler.INSTANCE);
+				testProjectManager.getPackageDescriptor(uri).configure(myQVT.getMetamodelManager().getASResourceSet(), StandaloneProjectMap.LoadFirstStrategy.INSTANCE,
+					StandaloneProjectMap.MapToFirstConflictHandler.INSTANCE);
+			}
 			@SuppressWarnings("unused")
 			Class<? extends Transformer> txClass = myQVT.buildTransformation("qvtr", false); //,
 		} catch (Exception e) {
 			issues.addError(this, "Failed to compile 'ATL2QVTr.qvtr'", null, e, null);
 		}
 		finally {
-			myQVT.dispose();
+			if (myQVT != null) {
+				myQVT.dispose();
+			}
 			//			myQVT.removeRegisteredPackage("org.eclipse.qvtd.xtext.qvtrelation.tests.forward2reverse.doublylinkedlist.doublylinkedlistPackage");
 			//			myQVT.removeRegisteredPackage("org.eclipse.qvtd.xtext.qvtrelation.tests.forward2reverse.PForward2Reverse.PForward2ReversePackage");
 		}
diff --git a/tests/org.eclipse.qvtd.atl.tests/src/org/eclipse/qvtd/atl/tests/ATLExampleTests.java b/tests/org.eclipse.qvtd.atl.tests/src/org/eclipse/qvtd/atl/tests/ATLExampleTests.java
index 981c7ff..a5f3836 100644
--- a/tests/org.eclipse.qvtd.atl.tests/src/org/eclipse/qvtd/atl/tests/ATLExampleTests.java
+++ b/tests/org.eclipse.qvtd.atl.tests/src/org/eclipse/qvtd/atl/tests/ATLExampleTests.java
@@ -26,6 +26,7 @@
 import org.eclipse.m2m.atl.emftvm.compiler.AtlResourceFactoryImpl;
 import org.eclipse.m2m.atl.engine.parser.AtlParser;
 import org.eclipse.ocl.examples.codegen.dynamic.JavaFileUtil;
+import org.eclipse.ocl.examples.xtext.tests.TestProject;
 import org.eclipse.ocl.pivot.resource.ASResource;
 import org.eclipse.ocl.pivot.resource.ProjectManager;
 import org.eclipse.ocl.pivot.utilities.XMIUtil;
@@ -60,8 +61,8 @@
 			defaultSavingOptions.put(ASResource.OPTION_NORMALIZE_CONTENTS, Boolean.TRUE);
 		}
 
-		public MyQVT(@NonNull ProjectManager projectManager, @NonNull String testProjectName, @NonNull URI testBundleURI, @NonNull URI txURI, @NonNull URI intermediateFileNamePrefixURI, @NonNull URI srcFileURI, @NonNull URI binFileURI) {
-			super(projectManager, testProjectName, testBundleURI, txURI, intermediateFileNamePrefixURI, srcFileURI, binFileURI);
+		public MyQVT(@NonNull ProjectManager projectManager, @NonNull TestProject testProject, @NonNull URI testBundleURI, @NonNull URI txURI, @NonNull URI intermediateFileNamePrefixURI, @NonNull URI srcFileURI, @NonNull URI binFileURI) throws IOException {
+			super(projectManager, testProject, testBundleURI, txURI, intermediateFileNamePrefixURI, srcFileURI, binFileURI);
 			environmentFactory.getResourceSet().getResourceFactoryRegistry().getExtensionToFactoryMap().put("atl", new AtlResourceFactoryImpl());
 			//			getMetamodelManager().getASResourceSet().getResourceFactoryRegistry().getExtensionToFactoryMap().put("atl", new AtlResourceFactoryImpl());	// FIXME wrong ResourceSet
 			// Ensure ATL parser support is on classpath
@@ -100,7 +101,7 @@
 		URI intermediateFileNamePrefixURI = getTestURI(resultPrefix);
 		URI srcFileURI = getTestFileURI(JavaFileUtil.TEST_SRC_FOLDER_NAME + "/");
 		URI binFileURI = getTestFileURI(JavaFileUtil.TEST_BIN_FOLDER_NAME + "/");
-		return new MyQVT(testProjectManager, getTestProject().getName(), getTestBundleURI(), txURI, intermediateFileNamePrefixURI, srcFileURI, binFileURI);
+		return new MyQVT(testProjectManager, getTestProject(), getTestBundleURI(), txURI, intermediateFileNamePrefixURI, srcFileURI, binFileURI);
 	}
 
 	protected void doATLExampleTest_CG(@NonNull String resultPrefix, @NonNull URI atlURI) throws Exception {
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/OCL2QVTiTestCases.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/OCL2QVTiTestCases.java
index 22e9b27..924a72b 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/OCL2QVTiTestCases.java
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/OCL2QVTiTestCases.java
@@ -25,6 +25,7 @@
 import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
 import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.ocl.examples.codegen.dynamic.JavaClasspath;
 import org.eclipse.ocl.examples.codegen.dynamic.JavaFileUtil;
 import org.eclipse.ocl.examples.xtext.tests.TestUtil;
 import org.eclipse.ocl.pivot.internal.manager.MetamodelManagerInternal;
@@ -285,13 +286,13 @@
 		return new AbstractCompilerOptions() {};
 	}
 
-	private @NonNull CS2ASJavaCompilerParameters createParameters(@NonNull String lookupSolverClassName, @NonNull String lookupResultClassName) {
+	private @NonNull CS2ASJavaCompilerParameters createParameters(@NonNull String lookupSolverClassName, @NonNull String lookupResultClassName) throws IOException {
 		CS2ASJavaCompilerParametersImpl cgParams = new CS2ASJavaCompilerParametersImpl(lookupSolverClassName, lookupResultClassName,
 			getTestProject().getOutputFile(JavaFileUtil.TEST_SRC_FOLDER_NAME).getFileString());
 		if (EMFPlugin.IS_ECLIPSE_RUNNING) {
-			for (@NonNull String projectName : CompilerUtil.createClasspathProjectNameList(getTestBundleName())) {
-				cgParams.addClassPathProjectName(projectName);
-			}
+			JavaClasspath classpath = CompilerUtil.createDefaultQVTiClasspath();
+			classpath.addClass(getClass()/*getTestBundleName()*/);
+			cgParams.setClasspath(classpath);
 		}
 		cgParams.setClassLoader(getClass().getClassLoader());
 		return cgParams;
diff --git a/tests/org.eclipse.qvtd.umlx.tests/src/org/eclipse/qvtd/umlx/tests/UMLXCompilerTests.java b/tests/org.eclipse.qvtd.umlx.tests/src/org/eclipse/qvtd/umlx/tests/UMLXCompilerTests.java
index a64a382..778437f 100644
--- a/tests/org.eclipse.qvtd.umlx.tests/src/org/eclipse/qvtd/umlx/tests/UMLXCompilerTests.java
+++ b/tests/org.eclipse.qvtd.umlx.tests/src/org/eclipse/qvtd/umlx/tests/UMLXCompilerTests.java
@@ -19,6 +19,7 @@
 import org.eclipse.jdt.annotation.Nullable;
 import org.eclipse.ocl.examples.codegen.dynamic.JavaFileUtil;
 import org.eclipse.ocl.examples.xtext.tests.TestFileSystemHelper;
+import org.eclipse.ocl.examples.xtext.tests.TestProject;
 import org.eclipse.ocl.pivot.internal.resource.ProjectMap;
 import org.eclipse.ocl.pivot.model.OCLstdlib;
 import org.eclipse.ocl.pivot.resource.ProjectManager;
@@ -70,8 +71,8 @@
 			}
 		}
 
-		public MyQVT(@NonNull ProjectManager projectManager, @NonNull String testProjectName, @NonNull URI testBundleURI, @NonNull URI txURI, @NonNull URI intermediateFileNamePrefixURI, @NonNull URI srcFileURI, @NonNull URI binFileURI) {
-			super(projectManager, testProjectName, testBundleURI, txURI, intermediateFileNamePrefixURI, srcFileURI, binFileURI);
+		public MyQVT(@NonNull ProjectManager projectManager, @NonNull TestProject testProject, @NonNull URI testBundleURI, @NonNull URI txURI, @NonNull URI intermediateFileNamePrefixURI, @NonNull URI srcFileURI, @NonNull URI binFileURI) throws IOException {
+			super(projectManager, testProject, testBundleURI, txURI, intermediateFileNamePrefixURI, srcFileURI, binFileURI);
 		}
 
 		@Override
@@ -108,7 +109,7 @@
 		URI intermediateFileNamePrefixURI = getTestURI(resultPrefix);
 		URI srcFileURI = getTestFileURI(JavaFileUtil.TEST_SRC_FOLDER_NAME + "/");
 		URI binFileURI = getTestFileURI(JavaFileUtil.TEST_BIN_FOLDER_NAME + "/");
-		return new MyQVT(testProjectManager, getTestProject().getName(), getTestBundleURI(), txURI, intermediateFileNamePrefixURI, srcFileURI, binFileURI);
+		return new MyQVT(testProjectManager, getTestProject(), getTestBundleURI(), txURI, intermediateFileNamePrefixURI, srcFileURI, binFileURI);
 	}
 
 	@Override
diff --git a/tests/org.eclipse.qvtd.xtext.qvtbase.tests/src/org/eclipse/qvtd/xtext/qvtbase/tests/AbstractTestQVT.java b/tests/org.eclipse.qvtd.xtext.qvtbase.tests/src/org/eclipse/qvtd/xtext/qvtbase/tests/AbstractTestQVT.java
index 06150b1..1ed16b6 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtbase.tests/src/org/eclipse/qvtd/xtext/qvtbase/tests/AbstractTestQVT.java
+++ b/tests/org.eclipse.qvtd.xtext.qvtbase.tests/src/org/eclipse/qvtd/xtext/qvtbase/tests/AbstractTestQVT.java
@@ -18,7 +18,6 @@
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -34,7 +33,10 @@
 import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.ocl.examples.codegen.dynamic.JavaClasspath;
+import org.eclipse.ocl.examples.codegen.dynamic.JavaFileUtil;
 import org.eclipse.ocl.examples.codegen.dynamic.OCL2JavaFileObject;
+import org.eclipse.ocl.examples.xtext.tests.TestProject;
 import org.eclipse.ocl.pivot.PivotTables;
 import org.eclipse.ocl.pivot.internal.manager.MetamodelManagerInternal;
 import org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap;
@@ -148,7 +150,7 @@
 	/**
 	 * Project names needed on the classpath in addition to the defaults.
 	 */
-	private @Nullable List<@NonNull String> additionalProjectNames = null;
+	private final @NonNull JavaClasspath classpath;
 
 	private final @NonNull Map<@NonNull Class<? extends Partition>, @NonNull Integer> partitionClass2count = new HashMap<>();
 
@@ -158,20 +160,22 @@
 	private Set<@NonNull String> nsURIs = new HashSet<@NonNull String>();
 	private boolean suppressFailureDiagnosis = false;				// FIXME BUG 511028
 
-	protected final @NonNull String testProjectName;
+	protected final @NonNull TestProject testProject;
 	private Collection<@NonNull GenPackage> usedGenPackages = null;
 	private Collection<@NonNull EPackage> loadedEPackages = null;
 	private @Nullable String copyright = null;
 
-	public AbstractTestQVT(@NonNull ProjectManager projectManager, @NonNull String testProjectName, @NonNull URI testBundleURI, @NonNull URI txURI, @NonNull URI intermediateFileNamePrefixURI, @NonNull URI srcFileURI, @NonNull URI binFileURI) {
+	public AbstractTestQVT(@NonNull ProjectManager projectManager, @NonNull TestProject testProject, @NonNull URI testBundleURI, @NonNull URI txURI, @NonNull URI intermediateFileNamePrefixURI, @NonNull URI srcFileURI, @NonNull URI binFileURI) throws IOException {
 		super(new QVTiEnvironmentFactory(projectManager, null));
 		assert testBundleURI.isPlatform();
-		this.testProjectName = testProjectName;
+		this.testProject = testProject;
 		this.testBundleURI = testBundleURI;
 		this.txURI = txURI;
 		this.intermediateFileNamePrefixURI = intermediateFileNamePrefixURI;
 		this.srcFileURI = srcFileURI;
 		this.binFileURI = binFileURI;
+		this.classpath = CompilerUtil.createDefaultQVTiClasspath();
+		this.classpath.addFile(testProject.getOutputFile(JavaFileUtil.TEST_BIN_FOLDER_NAME).getFile());
 		assert srcFileURI.isFile();
 		assert srcFileURI.hasAbsolutePath();
 		assert binFileURI.isFile();
@@ -189,12 +193,8 @@
 		addUsedGenPackage(AbstractTransformer.TRACE_GENMODEL, AbstractTransformer.TRACE_GENMODEL_FRAGMENT);
 	}
 
-	public void addClasspathProjectName(@NonNull String projectName) {
-		List<@NonNull String> additionalProjectNames2 = additionalProjectNames;
-		if (additionalProjectNames2 == null) {
-			additionalProjectNames = additionalProjectNames2 = new ArrayList<>();
-		}
-		additionalProjectNames2.add(projectName);
+	public void addClasspathClass(@NonNull Class<?> classpathClass) {
+		classpath.addClass(classpathClass);
 	}
 
 	public void addRegisteredPackage(@NonNull String ePackageClassName) throws Exception {
@@ -263,7 +263,7 @@
 		return doCompile(txURI, intermediateFileNamePrefixURI, outputName, createCompilerChainOptions());
 	}
 
-	protected @NonNull CompilerOptions createBuildCompilerChainOptions(boolean isIncremental) {
+	protected @NonNull CompilerOptions createBuildCompilerChainOptions(boolean isIncremental) throws IOException {
 		DefaultCompilerOptions compilerOptions = createCompilerChainOptions();
 		compilerOptions.setGenerateClassesOptions(srcFileURI, binFileURI, createClassProjectNames(), isIncremental);
 		if (generateGenModel()) {
@@ -275,16 +275,11 @@
 
 	/**
 	 * Return a list of project names that need to be on the class path.
+	 * @throws IOException
 	 */
-	protected @NonNull List<@NonNull String> createClassProjectNames() {
-		List<@NonNull String> classProjectNames = CompilerUtil.createClasspathProjectNameList();
-		if (additionalProjectNames != null) {
-			for (@NonNull String projectName : additionalProjectNames) {
-				classProjectNames.add(0, projectName);
-			}
-		}
-		classProjectNames.add(0, testProjectName);
-		return classProjectNames;
+	protected @NonNull JavaClasspath createClassProjectNames() {
+		classpath.addClass(getClass()); //testProjectName);
+		return classpath;
 	}
 
 	protected abstract @NonNull AbstractCompilerChain createCompilerChain(@NonNull URI txURI, @NonNull URI intermediateFileNamePrefixURI,
@@ -474,6 +469,10 @@
 
 	protected abstract @NonNull String getBasePrefix();
 
+	public @NonNull JavaClasspath getClasspath() {
+		return classpath;
+	}
+
 	@Override
 	public @NonNull QVTiEnvironmentFactory getEnvironmentFactory() {
 		return super.getEnvironmentFactory();
diff --git a/tests/org.eclipse.qvtd.xtext.qvtcore.tests/src/org/eclipse/qvtd/xtext/qvtcore/tests/QVTcCompilerTests.java b/tests/org.eclipse.qvtd.xtext.qvtcore.tests/src/org/eclipse/qvtd/xtext/qvtcore/tests/QVTcCompilerTests.java
index 7d26b95..7610657 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtcore.tests/src/org/eclipse/qvtd/xtext/qvtcore/tests/QVTcCompilerTests.java
+++ b/tests/org.eclipse.qvtd.xtext.qvtcore.tests/src/org/eclipse/qvtd/xtext/qvtcore/tests/QVTcCompilerTests.java
@@ -11,13 +11,14 @@
 package org.eclipse.qvtd.xtext.qvtcore.tests;
 
 import java.io.IOException;
-import java.util.List;
 import org.eclipse.emf.common.EMFPlugin;
 import org.eclipse.emf.common.util.URI;
 import org.eclipse.emf.ecore.EPackage;
 import org.eclipse.emf.ecore.resource.Resource;
 import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.ocl.examples.codegen.dynamic.JavaClasspath;
 import org.eclipse.ocl.examples.codegen.dynamic.JavaFileUtil;
+import org.eclipse.ocl.examples.xtext.tests.TestProject;
 import org.eclipse.ocl.pivot.internal.resource.ProjectMap;
 import org.eclipse.ocl.pivot.model.OCLstdlib;
 import org.eclipse.ocl.pivot.resource.ProjectManager;
@@ -81,8 +82,8 @@
 			}
 		}
 
-		public MyQVT(@NonNull ProjectManager projectManager, @NonNull String testProjectName, @NonNull URI testBundleURI, @NonNull URI txURI, @NonNull URI intermediateFileNamePrefixURI, @NonNull URI srcFileURI, @NonNull URI binFileURI) {
-			super(projectManager, testProjectName, testBundleURI, txURI, intermediateFileNamePrefixURI, srcFileURI, binFileURI);
+		public MyQVT(@NonNull ProjectManager projectManager, @NonNull TestProject testProject, @NonNull URI testBundleURI, @NonNull URI txURI, @NonNull URI intermediateFileNamePrefixURI, @NonNull URI srcFileURI, @NonNull URI binFileURI) throws IOException {
+			super(projectManager, testProject, testBundleURI, txURI, intermediateFileNamePrefixURI, srcFileURI, binFileURI);
 		}
 
 		@Override
@@ -99,10 +100,10 @@
 		}
 
 		@Override
-		protected @NonNull List<@NonNull String> createClassProjectNames() {
-			List<@NonNull String> classProjectNames = super.createClassProjectNames();
-			classProjectNames.add(0, "org.eclipse.qvtd.xtext.qvtcore.tests");
-			return classProjectNames;
+		protected @NonNull JavaClasspath createClassProjectNames() {
+			JavaClasspath classpath = super.createClassProjectNames();
+			classpath.addClass(/*0,*/ getClass());
+			return classpath;
 		}
 
 		@Override
@@ -121,7 +122,7 @@
 		URI intermediateFileNamePrefixURI = getTestURI(resultPrefix);
 		URI srcFileURI = getTestFileURI(JavaFileUtil.TEST_SRC_FOLDER_NAME + "/");
 		URI binFileURI = getTestFileURI(JavaFileUtil.TEST_BIN_FOLDER_NAME + "/");
-		return new MyQVT(testProjectManager, getTestProject().getName(), getTestBundleURI(), txURI, intermediateFileNamePrefixURI, srcFileURI, binFileURI);
+		return new MyQVT(testProjectManager, getTestProject(), getTestBundleURI(), txURI, intermediateFileNamePrefixURI, srcFileURI, binFileURI);
 	}
 
 	/* (non-Javadoc)
@@ -469,7 +470,8 @@
 		String exampleProjectName = "org.eclipse.qvtd.examples.qvtcore.uml2rdbms";
 		URI txURI = URI.createPlatformResourceURI("/" + exampleProjectName + "/model/SimpleUML2RDBMS.qvtc", true);
 		MyQVT myQVT = createQVT("SimpleUML2RDBMS", txURI);
-		myQVT.addClasspathProjectName(exampleProjectName);
+		JavaClasspath classpath = myQVT.getClasspath();
+		classpath.addClass(org.eclipse.qvtd.examples.qvtcore.uml2rdbms.simpleuml2rdbms.UmlToRdbmsModelElement.class);
 		myQVT.setSuppressFailureDiagnosis(true);					// FIXME BUG 511028
 		try {
 			Class<? extends Transformer> txClass = myQVT.buildTransformation("rdbms", false, "SimpleUML2RDBMS.genmodel");
diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/QVTiCompilerTests.java b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/QVTiCompilerTests.java
index e73243c..a4668d7 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/QVTiCompilerTests.java
+++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/QVTiCompilerTests.java
@@ -12,6 +12,7 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -20,20 +21,31 @@
 
 import javax.tools.JavaFileObject;
 
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
 import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
 import org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage;
+import org.eclipse.emf.common.EMFPlugin;
 import org.eclipse.emf.common.util.URI;
 import org.eclipse.emf.ecore.EAttribute;
 import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EStructuralFeature;
 import org.eclipse.emf.ecore.resource.Resource;
 import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.URIConverter;
 import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.xmi.impl.GenericXMLResourceFactoryImpl;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.ocl.examples.codegen.dynamic.JavaClasspath;
 import org.eclipse.ocl.examples.codegen.dynamic.JavaFileUtil;
 import org.eclipse.ocl.examples.codegen.dynamic.OCL2JavaFileObject;
+import org.eclipse.ocl.examples.codegen.utilities.CGUtil;
 import org.eclipse.ocl.examples.pivot.tests.PivotTestCase.GlobalStateMemento;
 import org.eclipse.ocl.examples.xtext.tests.TestFile;
 import org.eclipse.ocl.examples.xtext.tests.TestProject;
@@ -76,6 +88,7 @@
 import org.eclipse.qvtd.xtext.qvtbase.tests.LoadTestCase;
 import org.eclipse.qvtd.xtext.qvtbase.tests.ModelNormalizer;
 import org.eclipse.qvtd.xtext.qvtbase.tests.utilities.XtextCompilerUtil;
+import org.osgi.framework.Bundle;
 
 import com.google.common.collect.Iterables;
 import junit.framework.TestCase;
@@ -102,14 +115,14 @@
 			this.testProject = testProject;
 		}
 
-		private Class<? extends Transformer> compileTransformation(@NonNull File explicitClassPath, @NonNull QVTiCodeGenerator cg, @NonNull List<@NonNull String> extraClasspathProjects) throws Exception {
+		private Class<? extends Transformer> compileTransformation(@NonNull File explicitClassPath, @NonNull QVTiCodeGenerator cg, @NonNull JavaClasspath classpath) throws Exception {
 			String qualifiedClassName = cg.getQualifiedName();
 			String javaCodeSource = cg.generateClassFile();
 			String string = explicitClassPath.toString();
 			assert string != null;
 			//			String message = OCL2JavaFileObject.saveClass(string, qualifiedClassName, javaCodeSource, extraClasspathProjects);
 			List<@NonNull JavaFileObject> compilationUnits = Collections.singletonList(new OCL2JavaFileObject(qualifiedClassName, javaCodeSource));
-			String message = JavaFileUtil.compileClasses(compilationUnits, qualifiedClassName, string, extraClasspathProjects);
+			String message = JavaFileUtil.compileClasses(compilationUnits, qualifiedClassName, string, classpath);
 			if (message != null) {
 				fail(message);
 			}
@@ -173,12 +186,13 @@
 			TestFile binPath = testProject.getOutputFolder(JavaFileUtil.TEST_BIN_FOLDER_NAME);
 			//			cg.saveSourceFile("../org.eclipse.qvtd.xtext.qvtimperative.tests/test-gen/");
 			cg.saveSourceFile(srcPath.getFileString());
-			List<@NonNull String> projectNames = CompilerUtil.createClasspathProjectNameList("org.eclipse.qvtd.xtext.qvtimperative.tests");
+			JavaClasspath classpath = CompilerUtil.createDefaultQVTiClasspath();
+			classpath.addClass(getClass());
 			// System.out.println("projectNames => " + projectNames);
-			List<@NonNull String> classpathList = JavaFileUtil.createClassPathProjectList(asTransformation.eResource().getResourceSet().getURIConverter(), projectNames);
+			// List<@NonNull String> classpathList = classpath.getClasspathProjectList();
 			// System.out.println("classpathList => " + classpathList);
 
-			Class<? extends Transformer> txClass = compileTransformation(binPath.getFile(), cg, classpathList);
+			Class<? extends Transformer> txClass = compileTransformation(binPath.getFile(), cg, classpath);
 			if (txClass == null) {
 				TestCase.fail("Failed to compile transformation");
 				throw new UnsupportedOperationException();
@@ -186,6 +200,155 @@
 			return txClass;
 		}
 
+		public static @NonNull List<@NonNull String> my_createClassPathProjectList(@NonNull URIConverter uriConverter, @NonNull List<@NonNull String> projectNames) {
+			List<@NonNull String> classpathProjectList = new ArrayList<@NonNull String>();
+			for (@NonNull String projectName : projectNames) {
+				File path = my_getProjectBinFolder(uriConverter, projectName);
+				if (path != null) {
+					classpathProjectList.add(String.valueOf(path));
+				}
+			}
+			//		}
+			return classpathProjectList;
+		}
+
+		private static final @NonNull String MAVEN_TYCHO_BIN_FOLDER_NAME = "target/classes";
+		private static final @NonNull String REGULAR_BIN_FOLDER_NAME = "bin";
+
+		/**
+		 * Return the file system folder suitable for use as a javac classpath entry.
+		 *
+		 * For workspace projects this is the "bin" folder. For plugins it is the jar file.
+		 */
+		public static @Nullable File my_getProjectBinFolder(@NonNull URIConverter uriConverter, @NonNull String projectName) {
+			Class<?> class1 = QVTiCompilerTests.class;
+			String modifiedProjectName = projectName.replace('.', '/');
+			URL projectResource = class1.getResource("/" + modifiedProjectName);
+			if (projectResource != null) {
+				String projectString = projectResource.toString();
+				String pathString = projectString.substring(0, projectString.length() - modifiedProjectName.length());
+				URI pathURI = URI.createURI(pathString);
+				return new File(pathURI.isFile() ? pathURI.toFileString() : pathURI.toString());
+			}
+			//			String externalForm = resource2.toExternalForm();
+			//			java.net.URI uri2;
+			//			try {
+			//				uri2 = resource2.toURI();
+			//			} catch (URISyntaxException e) {
+			//				// TODO Auto-generated catch block
+			//				e.printStackTrace();
+			//			}
+			//			String string = resource2.toString();
+			String path = null;
+			String binDir = CGUtil.isMavenSurefire() || CGUtil.isTychoSurefire() ? MAVEN_TYCHO_BIN_FOLDER_NAME : REGULAR_BIN_FOLDER_NAME;  // FIXME determine "bin" from JDT
+			URI platformURI = URI.createPlatformResourceURI("/" + projectName + "/", true);
+			URI pathURI = uriConverter.normalize(platformURI);
+			String location = null;
+			if (EMFPlugin.IS_ECLIPSE_RUNNING) {
+				Bundle bundle = Platform.getBundle(projectName);
+				if (bundle != null) {
+					try {
+						File bundleFilePath = my_getOSGIClassPath(bundle);
+						location = bundle.getLocation();
+						path = bundleFilePath.toString();
+					} catch (IOException e) {
+						// Doesn't fail for sensible names.
+					}
+				}
+				if (path == null) {					// platform:/resource
+					IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
+					IResource project = workspaceRoot.findMember(projectName);
+					if (project != null) {
+						location = String.valueOf(project.getLocation());
+						path = location + "/" + JavaFileUtil.TEST_BIN_FOLDER_NAME;
+					}
+				}
+			}
+			else if (pathURI.isArchive()) {
+				path = pathURI.toString();
+				if (path.startsWith("archive:file:") && path.endsWith("!/")) {
+					path = path.substring(13, path.length()-2);
+				}
+			}
+			else {
+				path = pathURI.toFileString();
+				if (path != null) {
+					if (!new File(path + "/META-INF").exists()) {
+						path = path + JavaFileUtil.TEST_BIN_FOLDER_NAME;
+					}
+					else {
+						path = path + binDir;
+					}
+				}
+			}
+			if (JavaFileUtil.CLASS_PATH.isActive()) {
+				StringBuilder s = new StringBuilder();
+				s.append(projectName);
+				s.append(" => ");
+				s.append(pathURI);
+				s.append(" => ");
+				if (location != null) {
+					s.append(location);
+					s.append(" => ");
+				}
+				s.append(path);
+				System.out.println(s.toString());
+			}
+			return path != null ? new File(path) : null;
+		}
+
+		/**
+		 * Return the absolute path to the 'bin' folder of a workspace bundle or the jar of a plugin.
+		 */
+		public static @NonNull File my_getOSGIClassPath(@NonNull Bundle bundle) throws IOException {
+			//
+			//  We could be helpful and use the classes from  a project, but that would be really confusing
+			//  since template classes would come from the development project whereas referenced classes
+			//  would come from the run-time plugin. Ignore the project files.
+			//
+			File bundleFile = FileLocator.getBundleFile(bundle);
+			if (bundleFile.isDirectory()) {
+				File outputPath = my_getOutputClassPath(bundleFile);
+				if (outputPath != null) {
+					return outputPath;
+				}
+			}
+			return bundleFile;
+		}
+
+		/**
+		 * Search the .classpath of bundle to locate the output classpathEntry and return the corresponding path
+		 * or null if no .classpath or output classpathentry.
+		 */
+		private static @Nullable File my_getOutputClassPath(@NonNull File bundleDirectory) throws IOException {
+			if (CGUtil.isMavenSurefire() || CGUtil.isTychoSurefire()) {
+				return new File(bundleDirectory, MAVEN_TYCHO_BIN_FOLDER_NAME);
+			}
+			File classpathEntry = new File(bundleDirectory, ".classpath");
+			if (classpathEntry.isFile()) {
+				URI uri = URI.createFileURI(classpathEntry.toString());
+				Resource resource = new GenericXMLResourceFactoryImpl().createResource(uri);
+				resource.load(null);
+				for (EObject eRoot : resource.getContents()) {
+					EClass eDocumentRoot = eRoot.eClass();
+					EStructuralFeature classpathentryRef = eDocumentRoot.getEStructuralFeature("classpathentry");
+					EStructuralFeature kindRef = eDocumentRoot.getEStructuralFeature("kind");
+					EStructuralFeature pathRef = eDocumentRoot.getEStructuralFeature("path");
+					for (EObject eObject : eRoot.eContents()) {
+						for (EObject eChild : eObject.eContents()) {
+							if (eChild.eContainmentFeature() == classpathentryRef) {
+								if ("output".equals(eChild.eGet(kindRef))) {
+									String outputPath = String.valueOf(eChild.eGet(pathRef));
+									return new File(bundleDirectory, outputPath);
+								}
+							}
+						}
+					}
+				}
+			}
+			return null;
+		}
+
 		@Override
 		public @NonNull QVTiEnvironmentFactory getEnvironmentFactory() {
 			return (QVTiEnvironmentFactory) super.getEnvironmentFactory();
diff --git a/tests/org.eclipse.qvtd.xtext.qvtrelation.tests/src/org/eclipse/qvtd/xtext/qvtrelation/tests/QVTrCompilerTests.java b/tests/org.eclipse.qvtd.xtext.qvtrelation.tests/src/org/eclipse/qvtd/xtext/qvtrelation/tests/QVTrCompilerTests.java
index 9187fb3..538ebfc 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtrelation.tests/src/org/eclipse/qvtd/xtext/qvtrelation/tests/QVTrCompilerTests.java
+++ b/tests/org.eclipse.qvtd.xtext.qvtrelation.tests/src/org/eclipse/qvtd/xtext/qvtrelation/tests/QVTrCompilerTests.java
@@ -22,8 +22,10 @@
 import org.eclipse.m2m.atl.dsls.core.EMFTCSInjector;
 import org.eclipse.m2m.atl.emftvm.compiler.AtlResourceFactoryImpl;
 import org.eclipse.m2m.atl.engine.parser.AtlParser;
+import org.eclipse.ocl.examples.codegen.dynamic.JavaClasspath;
 import org.eclipse.ocl.examples.codegen.dynamic.JavaFileUtil;
 import org.eclipse.ocl.examples.xtext.tests.TestFileSystemHelper;
+import org.eclipse.ocl.examples.xtext.tests.TestProject;
 import org.eclipse.ocl.pivot.PivotPackage;
 import org.eclipse.ocl.pivot.internal.manager.PivotMetamodelManager;
 import org.eclipse.ocl.pivot.internal.resource.ProjectMap;
@@ -94,13 +96,13 @@
 
 		private boolean keepOldJavaFiles = false;
 
-		public MyQVT(@NonNull ProjectManager projectManager, @NonNull String testProjectName, @NonNull URI testBundleURI, @NonNull URI txURI, @NonNull URI intermediateFileNamePrefixURI, @NonNull URI srcFileURI, @NonNull URI binFileURI) {
-			super(projectManager, testProjectName, testBundleURI, txURI, intermediateFileNamePrefixURI, srcFileURI, binFileURI);
+		public MyQVT(@NonNull ProjectManager projectManager, @NonNull TestProject testProject, @NonNull URI testBundleURI, @NonNull URI txURI, @NonNull URI intermediateFileNamePrefixURI, @NonNull URI srcFileURI, @NonNull URI binFileURI) throws IOException {
+			super(projectManager, testProject, testBundleURI, txURI, intermediateFileNamePrefixURI, srcFileURI, binFileURI);
 			getEnvironmentFactory().setSafeNavigationValidationSeverity(StatusCodes.Severity.WARNING);
 		}
 
 		@Override
-		protected @NonNull CompilerOptions createBuildCompilerChainOptions(boolean isIncremental) {
+		protected @NonNull CompilerOptions createBuildCompilerChainOptions(boolean isIncremental) throws IOException {
 			CompilerOptions options = super.createBuildCompilerChainOptions(isIncremental);
 			if (keepOldJavaFiles) {
 				options.setOption(CompilerChain.GENMODEL_STEP, CompilerChain.KEEP_OLD_JAVA_FILES_KEY, Boolean.TRUE);
@@ -167,7 +169,7 @@
 		URI intermediateFileNamePrefixURI = getTestURI(resultPrefix);
 		URI srcFileURI = getTestFileURI(JavaFileUtil.TEST_SRC_FOLDER_NAME + "/");
 		URI binFileURI = getTestFileURI(JavaFileUtil.TEST_BIN_FOLDER_NAME + "/");
-		return new MyQVT(testProjectManager, getTestProject().getName(), getTestBundleURI(), txURI, intermediateFileNamePrefixURI, srcFileURI, binFileURI);
+		return new MyQVT(testProjectManager, getTestProject(), getTestBundleURI(), txURI, intermediateFileNamePrefixURI, srcFileURI, binFileURI);
 	}
 
 	@Override
@@ -245,11 +247,12 @@
 		myQVT1.addUsedGenPackage("org.eclipse.qvtd.pivot.qvtbase/model/QVTbase.genmodel", "//qvtbase");
 		myQVT1.addUsedGenPackage("org.eclipse.qvtd.pivot.qvtrelation/model/QVTrelation.genmodel", "//qvtrelation");
 		myQVT1.addUsedGenPackage("org.eclipse.qvtd.pivot.qvttemplate/model/QVTtemplate.genmodel", "//qvttemplate");
-		myQVT1.addClasspathProjectName("org.eclipse.m2m.atl.common");
-		myQVT1.addClasspathProjectName("org.eclipse.qvtd.pivot.qvtbase");
-		myQVT1.addClasspathProjectName("org.eclipse.qvtd.pivot.qvtrelation");
-		myQVT1.addClasspathProjectName("org.eclipse.qvtd.pivot.qvttemplate");
-		myQVT1.addClasspathProjectName("org.eclipse.qvtd.atl");
+		JavaClasspath classpath1 = myQVT1.getClasspath();
+		classpath1.addClass(org.eclipse.m2m.atl.common.ATLLaunchConstants.class);
+		classpath1.addClass(org.eclipse.qvtd.pivot.qvtbase.BaseModel.class);
+		classpath1.addClass(org.eclipse.qvtd.pivot.qvtrelation.RelationModel.class);
+		classpath1.addClass(org.eclipse.qvtd.pivot.qvttemplate.TemplateExp.class);
+		classpath1.addClass(org.eclipse.qvtd.atl.atl2qvtr.ATL2QVTr.class);
 		try {
 			ClassLoader classLoader = getClass().getClassLoader();
 			assert classLoader != null;
@@ -290,11 +293,12 @@
 		MyQVT myQVT3 = createQVT("Families2Persons", txURI2);
 		// Avoid the Java files being deleted, and add their classPath since we will compile them again Ugh! use different packge prefix
 		myQVT3.setKeepOldJavaFiles();
-		myQVT3.addClasspathProjectName("org.eclipse.m2m.atl.common");
-		myQVT3.addClasspathProjectName("org.eclipse.qvtd.pivot.qvtbase");
-		myQVT3.addClasspathProjectName("org.eclipse.qvtd.pivot.qvtrelation");
-		myQVT3.addClasspathProjectName("org.eclipse.qvtd.pivot.qvttemplate");
-		myQVT3.addClasspathProjectName("org.eclipse.qvtd.atl");
+		JavaClasspath classpath3 = myQVT3.getClasspath();
+		classpath3.addClass(org.eclipse.m2m.atl.common.ATLLaunchConstants.class);
+		classpath3.addClass(org.eclipse.qvtd.pivot.qvtbase.BaseModel.class);
+		classpath3.addClass(org.eclipse.qvtd.pivot.qvtrelation.RelationModel.class);
+		classpath3.addClass(org.eclipse.qvtd.pivot.qvttemplate.TemplateExp.class);
+		classpath3.addClass(org.eclipse.qvtd.atl.atl2qvtr.ATL2QVTr.class);
 		//		MyQVT myQVT3 = new MyQVT(createTestProjectManager(), getTestBundleURI(), "models/families2persons", "samples");
 		//		myQVT3.addRegisteredPackage("org.eclipse.qvtd.xtext.qvtrelation.tests.models.families2persons.Families.FamiliesPackage");
 		//		myQVT3.addRegisteredPackage("org.eclipse.qvtd.xtext.qvtrelation.tests.models.families2persons.Persons.PersonsPackage");