How do you clear the Java Console? [duplicate]

╄→尐↘猪︶ㄣ 提交于 2019-11-28 13:58:58

You will not be able to clear that console, unless you find some handle on the classes for that console (which I doubt you would have access to).

The requirement you have has the inevitable requirement that the user will need to go in and manually clear the console every couple of minutes. I think that justifies a rethink about why the requirement exists and wether there is another solution to solve your problem.

Have you considered a different way of logging?

Seems to me the requirement should be rediscussed. If this isn't an alternative then you may limit the amount of output, because a 1000 messages/s seems an awful lot to me.

I don't know if you even can programmatically clear the console.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!