I am trying to run a 64 bit executable (java.exe) from our 32-bit .NET application. I am using Process
class and invoking cmd /c <command name>
in order to support all possible commands (like dir
, cd
etc).
The problem is that on my machine I installed 64-bit version of JRE and java.exe is only available from C:WindowsSystem32
folder (x64). I have tried explicily starting 64 bit version of cmd.exe
by calling C:WindowsSystem32cmd.exe
but it gets redirected to SysWOW64
due to calling process being 32 bit.
Is there anything else I can do to get this to work?
EDIT The whole cmd /c
thing is a bit of a red herring. It is not part of the problem, being able to run 64 bit executables is.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…