Java Watch Service : Not Working for Remote Files mounted in the local Server

前端 未结 2 1314
终归单人心
终归单人心 2020-12-19 06:16

I have Java program monitoring a remote folder mounted in my local server. But it is not detecting any changes / modification whenever something changed in the remote folder

2条回答
  •  有刺的猬
    2020-12-19 06:48

    I guess, Oracle's watch service doesn't detect remote events - that service is for local directories.

    You have to use - org.apache.commons.io.monitor.FileAlterationMonitor class of API -

    
            commons-io
            commons-io
            2.6
    
    

    You should google for code samples using that class.

提交回复
热议问题