winapi - How to run java class via shellexecute (visual studio c++/mfc) -


i want run java application via shellexecute.

my attempt:

shellexecute(               null,                null,                _t("cmd.exe"),                _t("/k c:\\program files\\java\\jre1.8.0_45\\bin\\java -cp    c:\\users\\ager\\workspace\\iec60870\\bin main.capp 127.0.0.1 -p 2404"),                null,                sw_shownormal ); 

but command yield error:

the command "c:\program" either written wrong or not found

why?

you need quote path because of spaces between separate arguments in command line.


Comments