|
From: Thorsten L. <kar...@ya...> - 2007-10-05 10:59:28
|
I installed a service using a local account (namely Administrator for testi=
ng purposes) and have experienced that afterwards calling=0A=0ASystem.getEn=
v().get("PATH")=0A(or a system call "set %PATH%" from within my Java applic=
ation)=0A=0Areturns only the PATH variable exactly as defined in the Admini=
strator's variables - whereas I would have expected the standard Windows be=
havior of appending Administrator's PATH to the system PATH.=0ACan anyone t=
ell me why this happens when using the service wrapper? Or is this the defa=
ult Windows behavior when starting any service using a local user account?=
=0A=0AThe problem resulting for my app is that it makes an external system =
call to a batch file of a third-party product which, in turn, expects java.=
exe to be on the PATH. Now when I start my Java application manually everyt=
hing runs fine (since "C:\Windows\system32" is on the (global system) PATH =
and JRE copies its java.exe there) but using the service wrapper it fails b=
ecause the batch file started from within my Java app cannot locate java.ex=
e on the PATH (which is now cut down to the Administrator user PATH).=0A=0A=
While I could, of course, include the java home dir to the user PATH or mod=
ify the batch file telling it where to find java, I would not really want t=
o do this since it implies yet another adjustment to make on any system whe=
re my application will be installed.=0A=0AAny help is appreciated.=0A=0A=0A=
Thorsten=0A=0A=0A=0A=0A=0A Die etwas anderen Infos rund um das Thema R=
eisen. BE A BETTER WELTENBUMMLER! www.yahoo.de/clever |