> Can I refresh java heap before submitting another set of java applications?
Wah do you mean by "refresh java heap"?
They are different processes, that is, different JVM's, with different memory contents (heaps).
> why later sets of java application is taking longer?
Probably because of CPU usage. But could be memory.
>Can I do something here so that later sets of apps also completes in 3 mins
You tune the task, the complete task, to the box. That means you must understand in detail what is taking time and then architect that to make the best use of the available CPUs and memory (and other resources as used by the task.)