简体   繁体   中英

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!

This is more a function of the process you're starting as opposed to the process that's starting it (ie 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 .

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM