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.
精彩评论