restart windows

I want to restart Windows Xp through java application can i do that.if yes then how ?pl tell me . i want to restart windows through button click.ThanksHarsh
[191 byte] By [myharshdesignera] at [2007-10-2 5:39:17]
# 1
probably Runtime.exec("shutdown -r") or something.
CeciNEstPasUnProgrammeura at 2007-7-16 1:49:37 > top of Java-index,Java Essentials,New To Java...
# 2
Thanks Dear i have got the solution :-Dimension screensize = Toolkit.getDefaultToolkit().getScreenSize();this is working Fine :D> probably Runtime.exec("shutdown -r") or something.
myharshdesignera at 2007-7-16 1:49:37 > top of Java-index,Java Essentials,New To Java...
# 3
OOO Sorry MeansthisProcess p=Runtime.getRuntime().exec("shutdown /s /t 30");
myharshdesignera at 2007-7-16 1:49:37 > top of Java-index,Java Essentials,New To Java...
# 4
Shutdown :-Process p=Runtime.getRuntime().exec("shutdown /s /t 30");restartProcess p=Runtime.getRuntime().exec("shutdown /r /t 30");
myharshdesignera at 2007-7-16 1:49:37 > top of Java-index,Java Essentials,New To Java...
# 5
Weird.. I am running Windows XP and when I open the command line and typeshutdown /?it says the arguments are preceeded by a "-" not a "/", I am using Windows XP Pro, so it might be different but I highly doubt it.. also, dont triple post like that.. it is unnecessary
DarkNomada at 2007-7-16 1:49:37 > top of Java-index,Java Essentials,New To Java...