VirtualFile[] roots = new VirtualFile[classPath.size() + 1];
int i = 0;
for (VirtualFile path : classPath)
roots[i++] = path;
MemoryContextFactory factory = MemoryContextFactory.getInstance();
factory.createRoot(module.getDynamicClassRoot());
URL url = new URL(module.getDynamicClassRoot() + "/classes");
roots[i++] = factory.createDirectory(url).getVirtualFile();
VFSClassLoaderPolicy policy = new VFSClassLoaderPolicy(module.getName(), roots);
policy.setExportAll(module.getExportAll());
policy.setImportAll(module.isImportAll());
// TODO JBMICROCONT-182 more policy from "module"