home *** CD-ROM | disk | FTP | other *** search
/ Freelog Special Freeware 25 / FreelogHS25.iso / Dessin / ArtOfIllusion2.2.1 / ArtOfIllusion.jar / bsh / commands / exec.bsh < prev    next >
Text File  |  2005-05-23  |  373b  |  15 lines

  1. /**
  2.     Start an external application using the Java Runtime exec() method.
  3.     Display any output to the standard BeanShell output using print().
  4. */
  5.  
  6. bsh.help.exec = "usage: exec( String arg )";
  7.  
  8. exec( String arg ) 
  9. {
  10.     this.proc = Runtime.getRuntime().exec(arg);
  11.     this.din = new DataInputStream( proc.getInputStream() );
  12.     while( (line=din.readLine()) != null )
  13.         print(line);
  14. }
  15.