I have developed a standalone application using java, in which I am executing an external process using Runtime. But the execution of that process takes much time, and I would like to display a progress monitor of it.
How can I get the progress of a process that has been executed using Java runtime? Should I use a Progress Bar?
To be able to ‘know’ the progress of the process, you will need to implement some sort of milestones that the process changes as it goes along. You will have to implement that logic so that the external process notifies your application of its progress. However, this is not always possible (because, first of all you need access to the code of the external process) or simple to do.
What you can do, is to use a Marquee Progress bar, this will keep an animation going indefinitevely:
You can take a look at this Java tutorial (same place from where I got the above text) for more information.