0

How to clear console using java program

23rd Jan 2018, 5:41 AM
sai
2 Answers
+ 3
One way is to write: Runtime.getRuntime().exec("PlatformDepedentCode"); and substitute whatever command clears the console in your environment. E.g., if your shell is Bash, sub "clear" for "PlatformDepedentCode".
23rd Jan 2018, 6:18 AM
Eric Blinkidu
Eric Blinkidu - avatar
+ 1
ctrl + l
23rd Jan 2018, 5:47 AM
Julian Blanco
Julian Blanco - avatar