@Test public void workaround_for_Eclipse_JUnit_integration_producing_invalid_classpath_elements_on_Windows() { String troublesomePath = "/C:/eclipse/configuration/org.eclipse.osgi/bundles/200/1/.cp/"; Path fixedPath = Classpath.getClasspathElements(troublesomePath, ";").get(0); assertThat(fixedPath.toString(), containsString("C:")); assertThat(fixedPath.getFileName().toString(), is(".cp")); }
public static List<Path> getClasspathElements(String classpath, String pathSeparator) { List<Path> results = new ArrayList<>(); for (String path : classpath.split(Pattern.quote(pathSeparator))) { results.add(new File(path).toPath()); } return results; }
Classpath { public static List<Path> getClasspathElements(String classpath, String pathSeparator) { List<Path> results = new ArrayList<>(); for (String path : classpath.split(Pattern.quote(pathSeparator))) { results.add(new File(path).toPath()); } return results; } }
Classpath { public static List<Path> getClasspathElements(String classpath, String pathSeparator) { List<Path> results = new ArrayList<>(); for (String path : classpath.split(Pattern.quote(pathSeparator))) { results.add(new File(path).toPath()); } return results; }  }
Classpath { public static List<Path> getClasspathElements(String classpath, String pathSeparator) { List<Path> results = new ArrayList<>(); for (String path : classpath.split(Pattern.quote(pathSeparator))) { results.add(new File(path).toPath()); } return results; }  static Path[] currentClasspath(); static List<Path> getClasspathElements(String classpath, String pathSeparator); static List<Path> excludeJdkClasses(List<Path> classpath); }
Classpath { public static List<Path> getClasspathElements(String classpath, String pathSeparator) { List<Path> results = new ArrayList<>(); for (String path : classpath.split(Pattern.quote(pathSeparator))) { results.add(new File(path).toPath()); } return results; }  static Path[] currentClasspath(); static List<Path> getClasspathElements(String classpath, String pathSeparator); static List<Path> excludeJdkClasses(List<Path> classpath);  }