Re: JButton and Execute Windows Batch File
- From: m.djukic@xxxxxxxxxx
- Date: 19 May 2007 16:01:55 -0700
try:
....
Runtime r = Runtime.getRuntime();
Process p = null;
String cmd = "c://test.bat";
try {
p = r.exec(cmd);
p.waitFor(); //to wait to execute command
} catch (Exception e) {
System.out.println("error executing " + cmd);
}
System.out.println(cmd + " returned " + p.exitValue());
.
- References:
- JButton and Execute Windows Batch File
- From: banker123
- Re: JButton and Execute Windows Batch File
- From: Brandon McCombs
- JButton and Execute Windows Batch File
- Prev by Date: Re: How to add two components on a Jtable header?
- Next by Date: Java Team Leader
- Previous by thread: Re: JButton and Execute Windows Batch File
- Next by thread: Re: Is this a bug in javax.swing.JFileChooser?
- Index(es):