开发者

JNotify not functioning when used as a Windows Service

开发者 https://www.devze.com 2023-02-18 10:18 出处:网络
I am trying to use JNotify to monitor directory changes. My app works as it is supposed to running as a simple java app but when I modified the code to utilize WinRun4J to run my app as a windows serv

I am trying to use JNotify to monitor directory changes. My app works as it is supposed to running as a simple java app but when I modified the code to utilize WinRun4J to run my app as a windows service, the se开发者_JAVA百科rvice loads and starts fine, the listener is created but the code gets hung at the JNotify.addWatch call. No exception is thrown. Thanks.


Figured out issue. JNotify uses a dll. I added the location of the dll to the 'path' environment variable and it works fine. Sorry for wasting anyone's time.

0

精彩评论

暂无评论...
验证码 换一张
取 消