Clear screen with Java

<>

This question already has an answer here:

Answers


Try removing the qoutes from around cls on the second option, you are still just passing the string. Without the quotes you are using the String[] you defined.

String[] cls = new String[] {"cmd.exe", "/c", "cls"};
Runtime.getRuntime().exec(cls); 

Need Your Help

WPF: Is there a way to directly get the Window object a control is on?

wpf window controls

Is there a way to directly get the Window object a control is on?