Windows Mapped Drives are not visible when Java run as NT service

Hello,

I discovered that Java do not see Windows network mapped drives when it is run as a NT service.

The following code produces expected output when run in a normal way:

mySystemName

A:\

C:\

D:\

E:\

F:\

G:\

Y:\

Z:\

G, Y and Z are network mapped drives.

The same code when run as a NT service lists only "real" hardware drives. Note that NT service is run with my own privileged logon (not "SYSTEM" account).

mySystemName

A:\

C:\

D:\

E:\

F:\

System.out.println(System.getProperty("user.name"));

File[] files = File.listRoots();

for (int i = 0; i < files.length; i++){

File file = files[i];

System.out.println(file.getCanonicalPath());

}

Anybody can tell what happens? Thanks.

[1001 byte] By [vcherepanova] at [2007-11-26 17:40:51]
# 1
Yes, that's how it works. You are correct. But it has nothing to do with Java, that's just how Windows services work.
DrClapa at 2007-7-9 0:09:02 > top of Java-index,Java Essentials,Java Programming...