0
我必须在目录中创建一个硬链接到我的Java程序中的其他目录。 (所以不是一个文件的链接) 我用https://docs.oracle.com/javase/tutorial/essential/io/links.html但它不工作。 感谢您的帮助:)在java中为windows创建一个目录的硬链接
private static void creatlink(Path newLink, Path target) throws IOException {
try {
Files.createLink(newLink, target);
} catch (IOException x) {
System.err.println(x);
}
}
错误日志会很好。使用:x.printStackTrace(); – Flummox