Reputation: 2720
I have a console based java project in eclipse. I pass in 2 arguments during runtime - customer id and environment
Eg: 21 DEV
I want to run the project simultaneously for 3 different customers at the same time.
Can this be done? and How?
Upvotes: 1
Views: 4706
Reputation: 79875
Sure. All you need to do is to set up three different Run Configurations in Eclipse, with different arguments. The "Duplicate" button is good for doing this.
Then you can start them all from the "run" menu (the one with the green and white "triangle inside circle" icon), one after the other.
You can probably start them faster using this technique, than by using three different Eclipse instances or three separate command prompt windows.
Upvotes: 2
Reputation: 68715
You may not be able to achieve this using eclipse if your program exits too quickly. If you can afford to run three different eclipse instances on your machine, then you can run your program in each instance simultaneously.
Alternate approach is to use three different command prompts to do the same.
But in each of these cases, due to human delay you may not be able to test the simultaneous execution of the code. So better try to use threads for testing your program.
Upvotes: 0