I think what the OP wants is to clear the screen and move the cursor to the home position. For that try:
final String ANSI_CLS = "\u001b[2J";
final String ANSI_HOME = "\u001b[H";
System.out.print(ANSI_CLS + ANSI_HOME);
System.out.flush();
More Related Contents:
- How to open the command prompt and insert commands using Java?
- java Runtime.getRunTime().exec & wildcards?
- Eclipse RCP: Actions VS Commands
- Passing an Object to a method and returning a list of Objects any example [closed]
- While you save a file in .csv,how to remove the hyphen in the file name
- How to call a SOAP web service on Android [closed]
- Appending to an ObjectOutputStream
- Can we connect remote MySQL database in Android using JDBC? [closed]
- JDBC MySql connection pooling practices to avoid exhausted connection pool
- Ignoring SSL certificate in Apache HttpClient 4.3
- How to check certificate name and alias in keystore files?
- Convert HTML Character Back to Text Using Java Standard Library
- How to convert/parse from String to char in java?
- Java converting int to hex and back again
- Pros and cons of package private classes in Java?
- not implementing all of the methods of interface. is it possible?
- import com.sun.image.codec.jpeg.*
- How to check if a folder exists?
- loop on list with remove [duplicate]
- Android: Unable to find explicit activity class… startActivity from a PreferenceActivity
- java.lang.IllegalStateException: Multiple representations of the same entity with @ManyToMany 3 entities
- How can I change the width of a JComboBox dropdown list?
- Gradle: How to exclude a particular package from a jar?
- Changing packaging based on active profile in pom
- Is doFilter() executed before or after the Servlet’s work is done?
- How to specify function types for void (not Void) methods in Java8?
- Spring Boot @Async method in controller is executing synchronously
- URL parsing in Java
- Best way for automatic databinding between database and user interface in java swing app?
- Application is using Java 6 from Apple instead of Java 7 from Oracle on Mac OS X?