Excerpt from LOG4J2-1031 - "I have been working on the file watching of the scripts today. The more I work with it the less I like Java’s WatchService. Java makes no guarantees about how the service works. On my Mac it uses polling - but I don’t see any way to control the frequency. Furthermore, if you specify a file you will get an exception - it can only watch directories for changes.”
Ralph > On Apr 12, 2018, at 11:48 AM, Ralph Goers <ralph.go...@dslextreme.com> wrote: > > As Matt said, I originally tried to use WatchService. I don’t remember the > details now but do remember that during development I got frustrated with it > and decided it was more trouble than it was worth. > > Ralph > >> On Apr 12, 2018, at 10:06 AM, Gary Gregory <garydgreg...@gmail.com> wrote: >> >> On Thu, Apr 12, 2018 at 10:25 AM, Matt Sicker <boa...@gmail.com> wrote: >> >>> I'm not sure if it was ever fixed, but I remember that WatchService works >>> terribly on macOS for some reason (it's really laggy or something). >>> >> >> This would be JVM and JRE vendor dependent though. >> >> Gary >> >> >>> >>> On 12 April 2018 at 11:24, Remko Popma <remko.po...@gmail.com> wrote: >>> >>>> I remember Ralph looked at it but concluded it wasn’t fit for purpose. I >>>> forget the details but it’s on the mailing list somewhere. >>>> >>>> Remko >>>> >>>> (Shameless plug) Every java main() method deserves http://picocli.info >>>> >>>>> On Apr 13, 2018, at 0:10, Gary Gregory <garydgreg...@gmail.com> wrote: >>>>> >>>>> Hi All: >>>>> >>>>> Our WatchManager pools on a thread to watch files. >>>>> >>>>> Is there any reason why we are not using Java 7's WatchService? >>>>> >>>>> Yes, I know it only watches folders and not files but I consider that a >>>>> detail ;-) >>>>> >>>>> Gary >>>> >>> >>> >>> >>> -- >>> Matt Sicker <boa...@gmail.com> >>> > > >