Search code examples
intellij-idea

How do I run the same application twice in IntelliJ?


I'm using IntelliJ to develop my client-server application and just discovered Compounds. Basically I can run my client and my server at the same time and it's saving me useless manipulations everytime I want to test. However, I would like to test my application with 2 clients and 1 server since it's a game and have no point being played alone. IntelliJ does not let me add the same application twice in a compound. How can I achieve that ?

What I have now: Compound configuration

Plus, I can't tell a run configuration to run itself before launch. When I click the button in the following, image, the configuration I am on does not show up.

Can't run itself


Solution

  • You can copy the run configuration of your client, give it a different name and leave all other parameters unchanged. Then you'll be able to select the two copies in the "Compound" run configuration.