C
ccjjharmon
In a java bean, I am attempting to read a File object, which is a
mapped drive (X:\\) on a Windows 2003 Server. What I am trying to do is
read a file from this mapped drive.
Running Tomcat 5.5.15, with JRE 1.5.0_06.
When I have Tomcat started as a Windows service, the .canRead() method
returns false.
When I have Tomcat started manually (command-line), the .canRead()
method returns true. When I start it, I am logged into the server via
Remote Desktop as my network account login.
The mapped drive is setup under my login, and my login has read+write
privileges on this share.
Initially I figured this would occur when the Tomcat service is left
alone to "run-as" Local System, but even when I changed it to run as my
network account login, this still occurs.
I can't figure it out. Any ideas?
Code snippet:
String dir = "X:\\";
File theDir = new File(dir);
if (!theDir.canRead()) throw new Exception("cannot read from the
share");
Thanks in advance!
Chris Harmon
mapped drive (X:\\) on a Windows 2003 Server. What I am trying to do is
read a file from this mapped drive.
Running Tomcat 5.5.15, with JRE 1.5.0_06.
When I have Tomcat started as a Windows service, the .canRead() method
returns false.
When I have Tomcat started manually (command-line), the .canRead()
method returns true. When I start it, I am logged into the server via
Remote Desktop as my network account login.
The mapped drive is setup under my login, and my login has read+write
privileges on this share.
Initially I figured this would occur when the Tomcat service is left
alone to "run-as" Local System, but even when I changed it to run as my
network account login, this still occurs.
I can't figure it out. Any ideas?
Code snippet:
String dir = "X:\\";
File theDir = new File(dir);
if (!theDir.canRead()) throw new Exception("cannot read from the
share");
Thanks in advance!
Chris Harmon