how to continuously read a changing text file

Hello!

I am new to java, I wish to write java code to continuously read text file every time the file is modified, - like new text added. This is for my real-time thesis project. I have tried using while loop, but the code is not efficient, it real slows down the machines. Could anyone help me please.

Regards

[329 byte] By [marna] at [2007-10-3 9:47:55]
# 1

Hi!

When you say, you want to continuously read text file, i believe that even your java prog will be running?

I think you can try the 'keylistener' interface, it defines a function called keyPressed(), if you have javadocs, that's really good.

so whenever you type a key, this function will be called and you can write appropriate code in that function(keyPressed())

I really hope this solves ur problem

ALL the best!!

KayDeEa at 2007-7-15 5:05:01 > top of Java-index,Real-Time,Distributed Real-Time...