Results 1 to 4 of 4
Hi everyone please forgive me if this question is not appropriate here....
I want to call c exe from java source code and i want to interact with the c ...
- 08-13-2010 #1Just Joined!
- Join Date
- Jan 2010
- Posts
- 10
Calling c exe from java source
Hi everyone please forgive me if this question is not appropriate here....
I want to call c exe from java source code and i want to interact with the c program during it's execution, i am able to send the parameters to c program but i am not able to interact with it....so, please help me in this regard... thanx in advance every one
- 08-13-2010 #2
First: do not excuse for something you perfectly know it is wrong. Instead do it right from the start and put it into the right place.
Second: how did you intend to interact with the c program?
- 08-13-2010 #3Just Joined!
- Join Date
- Jan 2010
- Posts
- 10
I used the exec method of Runtime, but with this i am able to pass parameters to c program but i am not able to interact with it.
Example:
Runtime rt=new Runtime();
Process p=rt.getRuntime().exec("./hello praff");
In this i am able to send parameters to c program.
but if i want to read something in c using scanf during the execution it's not working.
- 08-13-2010 #4
Of course it doesn't. Where should it get the input from? Your program does not provide any kind of input stream to the "hello" process.


Reply With Quote