gpt4 book ai didi

java - 设置 JNotify

转载 作者:行者123 更新时间:2023-12-01 10:39:49 25 4
gpt4 key购买 nike

我已将 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com