Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Process p = Runtime.getRuntime().exec(...);
- p.waitFor();
- final Process process = new ProcessBuilder("blah blah").start();
- Runtime.getRuntime().addShutdownHook(new Thread() {
- @Override
- public void run() {
- process.destroy();
- }
- });
- process.waitFor();
Add Comment
Please, Sign In to add comment