|
From: Krassimir B. <kr...@ho...> - 2005-06-30 01:36:43
|
<html><div style='background-color:'><P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: Tahoma"><FONT face="Times New Roman, Times, Serif"><FONT size=3>Hi, <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></SPAN></P>
<P><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: Tahoma"><FONT face="Times New Roman, Times, Serif"><FONT size=3>I have Java application, using the Wrapper and installed as a NT service, which have to save a file on a mapped network drive (for example U:). Before saving a file it checks for the existence of the directory path - see below:<o:p></o:p></FONT></FONT></SPAN></P>
<P><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: Tahoma"><FONT face="Times New Roman, Times, Serif"><FONT size=3>File rootDir = new File("U:/");<BR>if (!rootDir.<SPAN style="COLOR: #ff0066">exists</SPAN>())<BR>{<BR> logger.error("Root directory does not exist! ");<BR>}<o:p></o:p></FONT></FONT></SPAN></P>
<P><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: Tahoma"><FONT face="Times New Roman, Times, Serif"><FONT size=3>The problem is that the exists() method returns false. I do not observe the same issue if I run the same code under command prompt (without using the wrapper and the NT service), i.e. the same method exists() returns true.<o:p></o:p></FONT></FONT></SPAN></P>
<P><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: Tahoma"><FONT face="Times New Roman, Times, Serif"><FONT size=3>The service is setup to run under the same account as the network drive is mapped.<o:p></o:p></FONT></FONT></SPAN></P>
<P><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: Tahoma"><FONT face="Times New Roman, Times, Serif"><FONT size=3>Please advice on how to resolve this problem. Your help is highly appreciated.<o:p></o:p></FONT></FONT></SPAN></P>
<P><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: Tahoma"><FONT face="Times New Roman, Times, Serif"><FONT size=3>Krassimir<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman, Times, Serif" size=3> </FONT></o:p></P></div></html>
|