| Author |
Running a Java Program from a C program
|
Arka Sharma
Ranch Hand
Joined: Jun 15, 2011
Posts: 102
|
|
Hi,
I have written a C program.Inside that i have called system("java JavaProg");.It is working fine but still the java process is terminated the C process is running.I want when the java process terminates normally or abruptly C process should automatically terminate.How to do it ?
Thanks,
Arka
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19232
|
|
|
Can you show the part of the C program that runs the Java program?
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Brian Overland
author
Ranch Hand
Joined: Sep 09, 2011
Posts: 36
|
|
Yes, I would need to seed the C program as well. You may need to make sure that the main() function is declared as int, and returns 0 to the operating system... or you may even need to exit explicitly by call an op-sys function. That's what springs to my mind.
I wish I knew more about the paticular code and the environment from which you are running.
BrianO.
|
 |
 |
|
|
subject: Running a Java Program from a C program
|
|
|