how clear console in eclipse directly using java code code example Example: java eclipse console clear for (int i = 0; i < 50; ++i) System.out.println();