fixed terminal clear on linux
This commit is contained in:
parent
5ffdb41147
commit
151bd5fa7b
1 changed files with 4 additions and 2 deletions
|
@ -58,8 +58,10 @@ public final class CommandLineHandler {
|
||||||
try {
|
try {
|
||||||
if (System.getProperty("os.name").contains("Windows"))
|
if (System.getProperty("os.name").contains("Windows"))
|
||||||
new ProcessBuilder("cmd", "/c", "cls").inheritIO().start().waitFor();
|
new ProcessBuilder("cmd", "/c", "cls").inheritIO().start().waitFor();
|
||||||
else
|
else {
|
||||||
Runtime.getRuntime().exec("clear");
|
System.out.print("\033[H\033[2J");
|
||||||
|
System.out.flush();
|
||||||
|
}
|
||||||
} catch (IOException | InterruptedException e) {
|
} catch (IOException | InterruptedException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue