use*_*378 0 java java-8 windows-server-2016
我在Windows Server 2016上使用Java 1.8,我的代码包含如下测试条件:
String path = "\\myserver\folder";
File file = new File(path);
if(file.isDirectory())
System.out.println("is a dir");
else
System.out.println("is not a dir");
Run Code Online (Sandbox Code Playgroud)
但总是返回值为false.我尝试了映射,创建了一个符号链接.我也尝试了java nio但没有改变.有谁知道为什么?它是Windows或Java的错误吗?
谢谢
归档时间: |
|
查看次数: |
59 次 |
最近记录: |