We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › DOS / cmd execution
Page Index Toggle Pages: 1
DOS / cmd execution? (Read 1524 times)
DOS / cmd execution?
May 13th, 2007, 3:53pm
 
hi all

is there any way to execute a DOS command from inside a processing app? this is of course not for a web applet but for an application residing on my hard drive -- i have a DOS program i would like to start up from within processing...

any clues?

thanks...
Re: DOS / cmd execution?
Reply #1 - May 13th, 2007, 3:57pm
 
uh... answered my own question...:

http://www.google.com/search?rls=en&q=java+dos+command+execute&ie=UTF-8&oe=UTF-8
Re: DOS / cmd execution?
Reply #2 - Apr 12th, 2009, 8:31am
 
found this. It also retrieve values


import java.io.*;

public class CmdExec {
 public static void main(String argv[]) {
   try {
     String line;
     Process p = Runtime.getRuntime().exec("test.cmd");
     p.waitFor();
     System.out.println(p.exitValue());
   }
   catch (Exception err) {
     err.printStackTrace();
   }
 }
}
Re: DOS / cmd execution?
Reply #3 - Apr 13th, 2009, 3:40am
 
See also http://processing.org/reference/open_.html doing that for you...
Page Index Toggle Pages: 1