If I execute the command "C:\Windows\system32\java.exe" on the commandline I get information about how to use java as it should be. However, when i write a simple c++ program to do the same
#include <iostream>
int main()
{
std::system("C:\\Windows\\system32\\java.exe");
return 0;
}
I get the following console output:
'C:\Windows\system32\java.exe' is not recognized as an internal or external command,
operable program or batch file.
I am using the mingw-w64 compiler on windows 10.
This is compatibility redirection by Windows on x64 systems:
In most cases, whenever a 32-bit application attempts to access %windir%\System32, the access is redirected to %windir%\SysWOW64.
If your console is 64 bit and application built as 32 bit (or vice versa) they'll show content of different system32 directories under same name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With