We are trying to create a file in mapped network drive (Z:\VOL3) using java.The file is successfully created in standalone java application.But if the same java application ruuning as windows service then its throwing "system cannot find the path specified" error.
We have tried like File f=new File("Z:\VOL3");
I am experiencing the same problem. Another poster on this site got it working by
1. Changing the service credentials to user (system accounts don't have network privileges)
2. Changing the file path you are trying to access to a UNC (I changed mine from Z: to \\billthecat\store for example)
These were not sufficient for me. When I switched the service account to 'Admin' from 'LocalSystem' I got a pop-up telling me that Admin was granted the 'run as system service' privilege, but I am skeptical. I am using XP Home and I can't actually examine my real privileges. I am wondering if I need a different version of Windows to make this work.