Search code examples
javac#startup

Starting C# project from Java application


I am trying to start my C# project from my java program. They are two separate programs, yet the C# one needs to start automatically when called by the java. There may be multiple threads of the C# project that needs to start up, so I plan on having this code in a for loop. I'll have an ArrayList of the threads I need separate applications for.Yes I need multiple, as they directly communicate with one end entity, and there may be multiple entities in the scenario. I also need to start it up with parameters to set up the message bus so that they can communicate later. If anyone knows how to do this or has done it before, any help would be appreciated. Thanks.


Solution

  • Try ProcessBuilder

    Process process = new ProcessBuilder(CSharpApplicationPath,"param1","param2").start()