Clear IntelliJ console from java
已回答
I am trying to clear intellij console, can someone help me?
Thanks :)
请先登录再写评论。
What do you mean by the console? Please provide the screenshot. Are you looking for a shortcut/button to clear it?
Hi Serge!
When I created projects with python, I used the system commands like "reset or clear on linux" or "cls on windows" to simulate that you enter to another view. I want do the same with Intellij's console, but I cant find information to do that. I attached a screen to the console that I want clean.
IntelliJ IDEA console is not a real terminal, so there is no command to clear it from your Java code.
dear Serge,
Thank you for the very important information you gave us.
So thinking about alternative workarounds, in conjunction with an answer by Jose Galdamez ( https://stackoverflow.com/a/71012497/20099393 ), could my application open the command line of my operating system and run the result there??
If so, how could I handle it? what commands should I put in my new supplementary method in my class to get me out of the IntelliJ “virtual” terminal?
The best option would be to build a jar of your app and run it in the Terminal via `java -jar jarname.jar`.