ClassLoader (Project project) { final List<URL> urls = new ArrayList<>(); final List<String> list = OrderEnumerator.orderEntries(project).recursively().librariesOnly().runtimeOnly().getPathsList().getPathList(); for (String path : list) { try { urls.add(new File(FileUtil.toSystemIndependentName(path)).toURI().toURL()); } catch (MalformedURLException e1) { LOG.info(e1); } } return new URLClassLoader(urls.toArray(new URL[0])); }