我已将 jnotify.jar 文件
附加到我引用的库中(在 Eclipse 中)。
出现错误:
The libraries cannot be found in "D:/Java/jre/bin"
我将 jnotify.dll
文件复制到该位置,现在仅在我的项目目录中跟踪文件更改,而不是系统上的其他任何位置。
如何设置它以便可以从任何其他目录跟踪文件更改?
String path = "C:/Users/ansuj/Desktop/testdir"; //does not fix the issue
最佳答案
从 Java bin 中删除该 dll。最好的做法是将它放在你的 jar 旁边并使用
java -jar -Djava.library.path=. something.jar
在 Eclipse 中您可以添加 -Djava.library.path=。到运行对话框屏幕中的 JVM 参数部分。
关于java - 设置 JNotify,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34489378/