Results 1 to 4 of 4
- 01-05-2010, 03:04 PM #1
Member
- Join Date
- Dec 2009
- Posts
- 59
- Rep Power
- 0
taking data from recent output file
hello
I have called whlole c code from java and then as result of calling c code from java the output file is saved. I need to call c code several times from java and then I need to use the data from the output file to do some calculations. but my problem is how to make sure that the data taken from the output file is taken from recent output file and how to make sure that the output file is saved before executing next command in java???
thanks alot
- 01-05-2010, 03:07 PM #2
Please give the glimpse of code here.
Ramya:cool:
- 01-05-2010, 04:52 PM #3
Member
- Join Date
- Dec 2009
- Posts
- 59
- Rep Power
- 0
ok the code I have used to call c code from java is the following:
I just have question if I want to execute c code from java several times and then read output file how can I make sure that I have read the most recent oneJava Code:String line; Process p = Runtime.getRuntime().exec("getting_output.exe"); BufferedReader input =new BufferedReader(new InputStreamReader(p.getInputStream())); while ((line = input.readLine()) != null) { System.out.println(line); } input.close();
thanks
- 01-05-2010, 11:48 PM #4gcampton Guest
Similar Threads
-
taking data from several textfields and combining them to be one item in a JList
By Ekul in forum New To JavaReplies: 3Last Post: 11-11-2009, 09:00 PM -
how to insert data in table (stored proc) without taking all the values as parameters
By Faheem_Ahmed in forum New To JavaReplies: 0Last Post: 02-28-2009, 11:16 AM -
How to read and write to a file without taking out the comments in the file
By MAGNUM in forum New To JavaReplies: 5Last Post: 02-05-2009, 10:28 AM -
Taking input from Properties File
By bugger in forum New To JavaReplies: 4Last Post: 05-07-2008, 09:30 AM -
Weird data output
By Shaolin in forum New To JavaReplies: 12Last Post: 12-11-2007, 04:27 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks