|
From: Leif M. <le...@ta...> - 2005-10-03 02:10:16
|
Laurent,
I have not played with that myself. The Wrapper runs as the SYSTEM
user by default.
It may be that that user does not have permission to restart the system.
What is being returned by the exec method? Look at the Process
object. As I recall,
you will get a Process object even if the command fails (Check this?).
You need to then
use the methods of that object to get the exit code, as well as any
standard or error output
from the process. My guess is that you are getting an error message
when you try to
restart the process.
If it is a permission problem then you may need to set up the
Wrapper to run as a user
which does have permission to restart the system. See the following:
http://wrapper.tanukisoftware.org/doc/english/prop-ntservice-account.html
Cheers,
Leif
lpr77 lpr77 wrote:
> Hi,
>
> I"m using the Java Service Wrapper to launch a Java application as a
> NT Service.
>
> My application runs fine, but I have to reboot the system.
> So i wrote this code :
> Process t = Runtime.getRuntime().exec("cmd /c shutdown -R -F -T 0");
>
> It isn"t running. There is nothing written to my logs.
>
> my application, not as a NT service, runs fine and reboot the system.
>
> So, is there a way to avoid this behavior?
>
> Thanks in advance
>
> Laurent
|