C
Chris
This is a repost (slightly modified) of an issue I posted a few days ago.
It seems that the java.io.File() class can't see files and directories on
other computers on a Windows network.
For example:
C:\ is a local drive
Z:\ is a mapped drive on another computer
(new File("C:\\mydir\myfile.txt")).exists() == true;
(new File("Z:\\mydir\myfile.txt")).exists() == false;
myfile *does* exist on the z: drive. You can navigate to it using Windows
Explorer, click on it, and edit it. You can also cd to this drive at the
command prompt.
My best guess is that this is a security/authentication issue. The network
uses Active Directory to authenticate users and give them access to shared
drives. But once the user is authenticated by Windows, I can't see why
Windows would deny access to a drive to an application being run by the same
user.
Has anyone seen this problem before? Why would Windows Explorer be able to
see this file but not Java?
It seems that the java.io.File() class can't see files and directories on
other computers on a Windows network.
For example:
C:\ is a local drive
Z:\ is a mapped drive on another computer
(new File("C:\\mydir\myfile.txt")).exists() == true;
(new File("Z:\\mydir\myfile.txt")).exists() == false;
myfile *does* exist on the z: drive. You can navigate to it using Windows
Explorer, click on it, and edit it. You can also cd to this drive at the
command prompt.
My best guess is that this is a security/authentication issue. The network
uses Active Directory to authenticate users and give them access to shared
drives. But once the user is authenticated by Windows, I can't see why
Windows would deny access to a drive to an application being run by the same
user.
Has anyone seen this problem before? Why would Windows Explorer be able to
see this file but not Java?