hmm...then i guess i thought up the wrong reason....
i did allocate a lot of space....
let me paste some of my actual code... (you will see there's hardly any difference between the example that i discussed earlier)
Code:
char * classpath = new char[65536];
if (classpath == NULL)
{
fprintf(stderr,"\nMemory allocation failed!");
exit(1);
}
char * javapath = "-Djava.class.path=";
char * env_var = getenv("JNI_CLASSPATH");
if ( classpath != NULL )
{
strcpy(classpath, javapath);
strcat(classpath, env_var);
}