Robert
Robert

Reputation: 527

Start 32bit process on 64bit OS

My C# programm starts java application on 64bit OS (Windows). Java process is 64bit, how can i fix my launching code to start java process in 32bit?

My launching code:

ProcessStartInfo info = new ProcessStartInfo();
info.WorkingDirectory = ServerProperties.ServerWorkingDirectory;
info.FileName = "java"
info.Arguments = "some arguements"
ServerProcess = new Process();
ServerProcess.StartInfo = info;
ServerProcess.Start();

Thanks!

Upvotes: 0

Views: 1779

Answers (2)

RredCat
RredCat

Reputation: 5421

If you host your application in IIS you need enable x86 processes for pool of web app. Follows next steps:

  1. Select the app pool for your web app.
  2. Click Advanced Settings under Edit Application Pool on the right.
  3. Change the value of Enable 32-Bit Applications to True.

Check next article for details - Support of 32-bit applications in the 64-bit Windows environment

Upvotes: 0

This is more a function of the process you're starting as opposed to the process that's starting it (i.e. the process that you're starting has to have been compiled/targeted to x86 as opposed to x86-64).

However, if both x86 and x86-64 java.exe are installed on the machine-in-question, you can probably hunt the x86 one down by looking in Program Files (x86) as opposed to Program Files.

Upvotes: 5

Related Questions