tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: Runtime exec (again)
Date Thu, 02 Dec 2004 13:57:29 GMT

You would also want to give the full path to cmd.exe possibly, depending
on how you launch Tomcat.

Yoav Shapira

>-----Original Message-----
>From: andy wix []
>Sent: Thursday, December 02, 2004 4:12 AM
>Subject: Runtime exec (again)
>Still can't get this to work.
>There must be some reason why this won't run under Tomcat but does work
>To recap, I am trying to execute the following code on an Xp box with
>Process proc = runtime.exec("cmd.exe /C shutdown -r -f -m \\myPC -t
>int exitVal = proc.waitFor();
>When this runs the proc exits with a value of 0 but nothing happens (no
>re-boot) and no exceptions are thrown.
>I have tried running the code from a batch file and without the cmd.exe
>I have tried running Tomcat from the command line (not as service).
>I have tried allowing all permissions in the catalina.policy file:
>grant codeBase "file:${catalina.home}/webapps/ROOT/WEB-INF/classes/-" {
>   permission "*";
>I CAN successfully set the the system time and date using the same
>I have absolutely no idea on this now.
>Express yourself with cool new emoticons
>To unsubscribe, e-mail:
>For additional commands, e-mail:

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message