Advertisement
souldown

Untitled

Sep 9th, 2013
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. void runCMDWindow(){
  2. Runtime rt = Runtime.getRuntime();
  3.  
  4. try {
  5. rt.exec("cmd.exe /c cd & start cmd.exe /k \"java -cp terminal-based-program.jar\"");
  6. } catch (IOException e1) {
  7. e1.printStackTrace();
  8. }
  9.  
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement