Could someone help me to develop a method to run any .jar file (with parameters) from in C# with XNA?
Since you give absolutely no details as to why you want to do this or how it would be used. I'll just give you the most straightforward simple answer I can come up with.
Start Java as a process:
String pathToJava = @"c:\program files\java\bin\java.exe";//replace with automated method to find java on machine String jarFile = "myjarfile.jar"; String parameters = "-p1 inputparam"; System.Diagnostics.Process.Start(pathToJava + " " + jarFile + " " + parameters);
You'd have to verify they have Java installed and that it's up-to-date. This is totally just a guess, since I don't use C# or XNA so I'm not sure if
Process.Start is supported in XNA or not. But this is a start for you.