> My java code is using native method calls.The native code prints out
> lots of data using "printf".Is is possible to capture such outputs from
> the native code so that the same outputs can be displayed on the GUI.
> An example code of a few lines would be of tremendous help because i
> am a newbie programmer in Java
I'm assuming you're not doing native calls via JNI, else you probably
wouldn't be a newbie programmer in Java.
If you can invoke a native program via Runtime.exec(), you'll get a
Process object, which has a getOutputStream() method.
Read the documentation at
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Process.html
- Oliver
kaushik.krishnakumar@gmail.com - 16 Feb 2006 04:27 GMT
I'm making native calls only but i'm new to JNI. My project requires to
pass values from GUI to the backend native code.There needs to be a
continuous logging of printf form the native code and be displayed in
the GUI.The native code returns few values but i also need to monitor
the output which is printed on the console by the native code. So is
there any methos through which i can capture those values ?