github / src / com / mizo0203 / timeline / talker / util / RuntimeUtil.java @ master
1 |
package com.mizo0203.timeline.talker.util; |
---|---|
2 |
|
3 |
import org.jetbrains.annotations.NotNull; |
4 |
|
5 |
import java.io.IOException; |
6 |
|
7 |
public class RuntimeUtil { |
8 |
|
9 |
public static void execute(String[] cmdarray) { |
10 |
try { |
11 |
Process process = Runtime.getRuntime().exec(cmdarray); |
12 |
process.waitFor(); |
13 |
process.destroy(); |
14 |
} catch (@NotNull IOException | InterruptedException e) { |
15 |
e.printStackTrace(); |
16 |
}
|
17 |
}
|
18 |
}
|