Search code examples
c#console-applicationsystem.diagnostics

Open .exe application from .NET console application


If I try to open Notepad from a .NET console application it works fine. I'm doing it as follows:

var p = new Process
{
    StartInfo =
    {
        FileName = "c:\windows\system32\notepad.exe";
    }
};

p.Start();

When I try to open the application I actually want to open, nothing happens. If I open that application by hand I see a Java process being created, which means it's a Java application packaged as an exe file.

Any ideas on how to open Java exe apps through .NET?

Thanks in advance


Solution

  • There shouldn't be much of a difference between a regular EXE and an "exified" Java application. Have you tried adjusting the working directory? Maybe there's some unzipping going on.