URLClassLoader (Project project, @NotNull ClassLoader parentClassLoader) { final List<String> pathList = ReadAction.compute(() -> OrderEnumerator.orderEntries(project).productionOnly().withoutSdk().recursively() .getPathsList().getPathList()); final List<URL> classpathUrls = new ArrayList<>(); for (String path : pathList) { try { URL url = new File(path).toURI().toURL(); classpathUrls.add(url); } catch (MalformedURLException e) { LOG.info(e); } } return new URLClassLoader(classpathUrls.toArray(new URL[0]), parentClassLoader); }