How to generate a multi trade program

I have this stand java program that does some sort of process on a big group of files.

I used to open different MS Dos windows to call same program with different parameters. So I kind a generate different instances of same program.

Is it possble to do same thing within the program using mulit trading ?
so I don't have to open many Dos windows to run different instances.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Maybe I don't get it right, but as I presume:

1) you can run an almost unlimited number of instances of the same program,
2) just the same you can run an almost unlimited number of threads in the same program,
each with its own window frame,
3) maybe the best solution for you is to have one program, many threads and each with its
own child window within the desktop fram of the program.

Nav444Author Commented:
Thanks sciriware!
I know I can run many instances of same program.
But that involves manual click on each one. I need to make in kind a automated. So I need to run each as a thread.
But I don't know how to create two or more thread of same program.
What is the actual java function to do this?
can you give me a very simple example?

public void addThread(JPanel placeToDisplay)
    new myThread(placeToDisplay).start();

public class myThread extends Thread
JPanel myBoard;

    myThread(JPanel board)
        myBoard = board;

    public void run()
//// set up visual components via 'myBoard'.
//// add yourself to a list of active threads
//// start your task

This is the simplest thing I can think of.
The tiny JPanels must be created before and placed my the 'main' thread.
There must be some buttons on them to communicate.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.