Java Refresh Problem
2 posts in topic
Flat View  Flat View

Posted By:   Andrei_Eryomchenko
Posted On:   Friday, July 26, 2002 05:49 AM

My programm writen in Java have to show the tree of directories in application window. And I want to update this tree when user has done something in other applications ( for example in Far Manager ) that changed the structure of directories on the disk. How can I know about this ?
I could not find anything in java api docs. May be the only way is to use java native methods and to write a C/C++ method working with Win23API ?

Re: Java Refresh Problem

Posted By:   Alex_Kobyakov  
Posted On:   Monday, July 29, 2002 12:21 AM

You can use threads to monitor directories that you need to update. In threads you can save content of folder and recompare each time with actual content from disk.

It's not a rocket science, after all. ;)

Re: Java Refresh Problem

Posted By:   Jorgen_Nordqvist  
Posted On:   Sunday, July 28, 2002 04:37 PM

I am afraid there is no such feature available in Java.

Windows Explorer and similar applications typically register callback methods that are called by the OS when the directories/files have been updated.

In order for you to take advantage of callbacks you are stuck with diving into the Win32 API using JNI.


About | Sitemap | Contact