Hi, i am trying to redirect the stdout to a file, i used JNI to run JBoss from jar file but i canīt redirect the output can some one help me here its the code i am trying to do:
i have alredy play with stdout but i canīt manipulate itCode:int main(int argc, char **argv) { FILE *stream; char linea[1024]; JNIEnv* env = create_vm(); stream = freopen("file.txt", "w", stdout); invoke_class( env ); fprintf(stream,stdout); //stream = freopen("CON", "w", stdout); /*stream = fopen("file3.txt","w"); stdout>stream;*/ /*while(stdout!=NULL) fprintf(stream,stdout);*/ getchar(); }
Thanks in advance



LinkBack URL
About LinkBacks


