This topic is now archived and is closed to further replies.

Clearing the DOS prompt screen in Java

This topic is 5896 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys can any of you tell me how to clear the DOS prompt screen using Java is there a method in the System class or what? I am using Java 2 and please no applet code... I am just coding in an MSDOS window Cheers Dark Star UK

Share this post

Link to post
Share on other sites
it can''t be done (to my knowledge). Java doesn''t think of a DOS window as a window

you can always try
for (int i = 0; i < 50; i ++ ) {


You might want to look into JDK1.4 - they might have added something, but my guess is if you want to do anything fancy, you might have to move up to AWT or Swing.

Brett Porter
PortaLib3D : A portable 3D game/demo libary for OpenGL
Community Service Announcement: Read How to ask questions the smart way before posting!

Share this post

Link to post
Share on other sites