Java Fitnesse扩展TestResponder并重写类路径位置
我最近开始使用fitnesse,遇到了在测试中必须硬编码jar路径的问题 我遇到了一些老教程,其中解释了扩展测试响应程序可以为这个版本设置类路径:Java Fitnesse扩展TestResponder并重写类路径位置,java,testing,fitnesse,Java,Testing,Fitnesse,我最近开始使用fitnesse,遇到了在测试中必须硬编码jar路径的问题 我遇到了一些老教程,其中解释了扩展测试响应程序可以为这个版本设置类路径: /** For FitNesse 20081115 protected String buildClassPath() throws Exception { return super.buildClassPath() + PATH_SEPARATOR + getInheritedClassPath(); } protected String
/** For FitNesse 20081115
protected String buildClassPath() throws Exception {
return super.buildClassPath() + PATH_SEPARATOR + getInheritedClassPath();
}
protected String getInheritedClassPath() {
String inheritedClasspath = "";
String parentClassPath = System.getProperty("java.class.path");
String[] classPathElements = parentClassPath.split(PATH_SEPARATOR);
for (String element : classPathElements) {
inheritedClasspath += PATH_SEPARATOR + "\"" + element + "\"";
}
return inheritedClasspath;
}
但是,我使用的是最新版本,buildClassPath()方法不可用,有人知道该怎么做吗