3

I have been searching around to see if there was anyway to run a java executable within a c# program, but I cannot seem to work it out or were to begin.

tshepang
  • 12,111
  • 21
  • 91
  • 136

2 Answers2

2

If you want to integrate a Java frame into a C# program, take a look at IKVM, that is :

an implementation of Java for Mono and the Microsoft .NET Framework.

otherwise you can simply call the java app packed into a jar file in this way :

        Process proc = new Process();  
        ProcessStartInfo startInfo = new ProcessStartInfo();  
        startInfo.Arguments = @"-jar javaapp.jar";  
        startInfo.FileName = "java";  
        proc.StartInfo = startInfo;  
        proc.Start(); 
aleroot
  • 71,077
  • 30
  • 176
  • 213
0

You could use IKVM which provides your exact requirement I guess.

1218985
  • 7,531
  • 2
  • 25
  • 31