I've tried the following and it doesn't work:
1. Start Windows service as a user that has permissions to that
network file share and map the network drive. Making sure to check
the box that says reconnect at logon. This doesn't work because the
service is essentially logging in as another user and it doesn't
perform any login functions like mapping network drives so the service
never sees the mapped drive.
2. Use UNC path notation (ie. \\\\hostname\\ShareName) everywhere
instead of the drive letter notation. This does work for everything
except for the JAXB 2.0 classes that we're using. For some reason
when you pass a File object that is pointing to (\\\\hostname\
\ShareName) then the JAXB unmarshall call throws an Exception that
says FileNotFoundException for \ShareName. So there must be a bug in
either the JDK 5 that we're using or in the JAXB 2.0 stuff.
If I had the money then I'd just setup a SAN so that all of servers
connected to that like they were local drives, but we don't. Is there
any kind of SAN emulation software or any way to do this on Windows?
I wish I could just use Linux... :)
Thanks in advance for any help!
Brent
http://forum.java.sun.com/thread.jspa?forumID=513&threadID=578688
You can also specify which user the service logs in as so that it can
see the drive...
I've also experienced in the past where if you don't physically log
onto the server and click on the network drive after its been rebooted
then for some reason the java program doesn't see the mapped drive.
This was on an old box running NT server and using jre1.3... so things
may have changed.
On Oct 6, 4:14 am, "brent.r...@gmail.com" <brent.r...@gmail.com>
wrote:
I think the only solution that will work for this is to have your Java
app mount the mapped drive on startup. I can't believe Windows can't
do this.... What a lame OS?
--Brent
On Oct 8, 7:37 am, "brent.r...@gmail.com" <brent.r...@gmail.com>
wrote: