How to show progresss on command line?

I am writing a Java application that has a command line interface. The application does quite some time-consuming file processing, so it would be nice if there are some kind of indication of progress on the command line.

I remember I have seen something like this on Unix/Linux. The command displays a spinning line, an ever-updating percentage value, or a crawling progress bar.

Does anyone have any idea how to do this in general? and even better, how to do this in Java?

Thanks.

[507 byte] By [mjsonga] at [2007-10-3 7:07:54]
# 1
I found it. http://mindprod.com/jgloss/progress.htmlThanks.
mjsonga at 2007-7-15 2:02:26 > top of Java-index,Desktop,Developing for the Desktop...