Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2006

Tip: Looking for answers? Try searching our database.

Capturing output form console

Thread view: 
kaushik.krishnakumar@gmail.com - 15 Feb 2006 11:03 GMT
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
Oliver Wong - 15 Feb 2006 15:51 GMT
> 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 ?


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.