Originally posted by navat venu:
How to execute a cmd file from the java code?
Actually i have to restart the weblogic server, when i click a button
on my jsp page.
So, I wanted to execute stopWeblogic.cmd and startWeblogic.cmd from the code.
How to do this?
Process process1 = Runtime.getRuntime().exec("\\directoryPath \\stopWeblogic.cmd");
I could imagine there being problems with this approach, since you're trying to kill the server that executes the command. That's just a hunch, though.