Groups | Search | Server Info | Login | Register
Groups > comp.lang.java.programmer > #5349
| From | www <xsli2@yahoo.com> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | a program process a constantly updated file |
| Date | 2011-06-17 10:15 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <885b80e6-864a-4076-b559-65b2452ffe9f@ct4g2000vbb.googlegroups.com> (permalink) |
Dear All: I need to write a Java program(since I am a Java developer) to do the following task: A commercial program sends out information to its log file once in a while. ANYTIME when a new line is inserted to the bottom of the log file, I want my Java program IMMEDIATELY(10~20 seconds delay is acceptable) read that new line, process it and do some other stuff based on the string in the new line. The commercial program is constantly running in Windows 7 24 hours a day 7 days a week. So my Java program needs always be running and waiting for any new line shows up in the log file. I have never developed such a Java program that runs all the time and wait for the update of a file. I can do the regular Java IO stuff. But I hate every second let the Java program open the log file and read it from the top to the bottom. That will occupy the computer CPU. I am wondering if there are some smart tools for this kind of purpose. Thank you very much.
Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar
a program process a constantly updated file www <xsli2@yahoo.com> - 2011-06-17 10:15 -0700
Re: a program process a constantly updated file www <xsli2@yahoo.com> - 2011-06-17 10:43 -0700
Re: a program process a constantly updated file Jeff Higgins <jeff@invalid.invalid> - 2011-06-17 13:51 -0400
Re: a program process a constantly updated file Jeff Higgins <jeff@invalid.invalid> - 2011-06-17 14:07 -0400
Re: a program process a constantly updated file www <xsli2@yahoo.com> - 2011-06-18 17:40 -0700
Re: a program process a constantly updated file Roedy Green <see_website@mindprod.com.invalid> - 2011-06-19 11:12 -0700
csiph-web