test.c

#include<stdio.h>
int main()
{
//System("cat test.c");
exit(0);
return(0);
}

output:
#include<stdio.h>
int main()
{
//System("cat test.c");
exit(0);
return(0);
}

when i compile & run this program in c then i want the same output in java program with it's compilation..
i think i hav to do some change in following statement:
//System("cat test.c");
but i'm not getting it...

Are you talking about calling Java from C? If so, you'll have to make use of the JNI. I've only done it the other way round - Java calling C through the JNI.

Perhaps this article may be useful (it's not for the faint-hearted):
http://java.sys-con.com/node/45840

I have not come across such a call.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.