Current location - Education and Training Encyclopedia - Resume - Want to write a shell script, the content is to create a directory, and how to call java, ask God for help!
Want to write a shell script, the content is to create a directory, and how to call java, ask God for help!
Public? Static electricity Synchronization? Invalid? www()? Throwing? Exceptions? {

Process? Dear? =? null

String? cmd? =? ”D:/database/SQL pad/SQL pad . cmd”;

Dear? =? Runtime.getRuntime()。 exec(cmd);

New? DoOutput(pro.getInputStream())。 start();

New? DoOutput(pro.getErrorStream())。 start();

}

Private? Static electricity Class? Output? Extension? Threads? {

Public? InputStream? Yes;

Public? doooutput(InputStream? Yes)? {

This is? =? Yes;

}

Public? Invalid? run()? {

BufferedReader? br? =? New? BufferedReader (new? InputStreamReader(this . is));

String? str? =? null

StringBuilder? sb? =? New? StringBuilder();

Try it? {

What time? ((str? =? br.readLine())? ! =? null){

sb . append(str+" \ n ");

}

}? Catch? (exception? e)? {

e . printstacktrace();

}? Finally? {

What if? (br? ! =? null)? {

Try it? {

br . close();

}? Catch? (exception? e)? {

e . printstacktrace();

}

}

}

}

}