|
From: Nicolas V. <ni...@va...> - 2007-09-08 06:56:54
|
Le 7 sept. 07 =E0 23:11, Frank F Chiang a =E9crit :
> I have a Java program in which I'm calling System.getProperty=20
> ("user.home"); to get the user's home directory. This would give =20
> me something like C:\Users\username (on Vista).
>
> I've connected it to the wrapper and when I run the App.bat file, =20
> everything is still fine, but when I install the program as a =20
> service and try to start it in Control Panel -> Administrative =20
> Tools -> Services, then it returns an error. In the log that was =20
> created, I see that System.getProperty("user.home") suddenly gives =20
> C:\ instead of my home directory.
>
> Does anyone know why this is and how to solve this problem?
>
> Thanks!
A Windows Service runs by default as SYSTEM user account.
Specify the service to run in a particular user account in the =20
service control panel of Windows.
Regards
Nicolas=
|