< prev index next >
test/lib/testlibrary/jdk/testlibrary/JDKToolFinder.java
Print this page
rev 1531 : 8171415: Remove Java 7 features from testlibrary
Reviewed-by: omajid
@@ -21,13 +21,12 @@
* questions.
*/
package jdk.testlibrary;
+import java.io.File;
import java.io.FileNotFoundException;
-import java.nio.file.Path;
-import java.nio.file.Paths;
public final class JDKToolFinder {
private JDKToolFinder() {
}
@@ -92,15 +91,15 @@
throw new RuntimeException(
"System property '" + property + "' not set. This property is normally set by jtreg. "
+ "When running test separately, set this property using '-D" + property + "=/path/to/jdk'.");
}
- Path toolName = Paths.get("bin", tool + (Platform.isWindows() ? ".exe" : ""));
+ File toolName = new File("bin", tool + (Platform.isWindows() ? ".exe" : ""));
- Path jdkTool = Paths.get(jdkPath, toolName.toString());
- if (!jdkTool.toFile().exists()) {
- throw new FileNotFoundException("Could not find file " + jdkTool.toAbsolutePath());
+ File jdkTool = new File(jdkPath, toolName.toString());
+ if (!jdkTool.exists()) {
+ throw new FileNotFoundException("Could not find file " + jdkTool.getAbsolutePath());
}
- return jdkTool.toAbsolutePath().toString();
+ return jdkTool.getAbsolutePath();
}
}
< prev index next >