Code:
sprintf(eclipse, "eclipse\\eclipse.exe -vm \\WINDOWS\\system32\\javaw.exe");
spawn_error_check = spawnl(_P_NOWAIT, eclipse_ptr, NULL);
The executable itself is one argument, and all the command line arguments are separate arguments after that. To signal the end of the arguments, you provide NULL as an argument, like so:
Code:
#include <process.h>
int spawnl( int mode,
const char * path,
const char * arg0,
const char * arg1...,
const char * argn,
NULL );
So you would call:
Code:
spawnl(_P_NOWAIT, "eclipse\\eclipse\.exe", "-vm", "\\WINDOWS\\system32\\javaw.exe", "NULL);