fixed terminal clear on linux

This commit is contained in:
Egor 2022-02-22 00:35:55 +03:00
parent 5ffdb41147
commit 151bd5fa7b

View file

@ -58,8 +58,10 @@ public final class CommandLineHandler {
try {
if (System.getProperty("os.name").contains("Windows"))
new ProcessBuilder("cmd", "/c", "cls").inheritIO().start().waitFor();
else
Runtime.getRuntime().exec("clear");
else {
System.out.print("\033[H\033[2J");
System.out.flush();
}
} catch (IOException | InterruptedException e) {
e.printStackTrace();
}