您好我希望能够运行不在我的eclipse项目中的JunitTest类,但在目录中,这就是我的意思
Class<?> clazz = How can I get a file.class("my/dir");
Result result = JUnitCore.runClasses(clazz);
for (Failure failure : result.getFailures()) {
System.out.println(failure.toString());
}
System.out.println(result.wasSuccessful());
}