java - 如何在Linux(Ubuntu操作系统)中配置Jnotify?

标签 java linux ubuntu-11.04 jnotify

我用过Jnotify在 window 中。我复制了SYSTEM文件夹和SYSTEM32中的DLL文件 并将 Jnotify.jar 包含在构建路径中。这个程序运行良好。我得到了 jnoitify 提供的 Windows 系统中的所有通知。

现在我希望 jnotify 在 Ubunt Linux 中工作。请帮助我我应该遵循什么程序。我将 Jnoitify.jar 包含在我的 java 类路径中。但它不起作用。

按照上述操作,会出现以下异常。

at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1709)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1030)
at net.contentobjects.jnotify.linux.JNotify_linux.<clinit>(Unknown Source)
at net.contentobjects.jnotify.linux.JNotifyAdapterLinux.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at net.contentobjects.jnotify.JNotify.<clinit>(Unknown Source)
at test.test2.NotifyHandler.sample(NotifyHandler.java:23)
at test.test2.NotifyHandler.main(NotifyHandler.java:42)

最佳答案

通过设置本地库的路径,我能够在Linux中配置和运行jnotify

关于java - 如何在Linux(Ubuntu操作系统)中配置Jnotify?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7726426/

相关文章:

Java 在 JPanel 类之外绘制图像

c++ - 从 rootfs 创建一个 docker 容器

c - 从 C 程序将 printf 写入 shell 脚本的单行控制台

mysql - Amazon EC2 EBS IO 计数很高

ruby-on-rails-3 - VirtualBox 和 Rails 服务器上的 Ubuntu

java - 即使不需要 ScrollView,如何使 Activity 可滚动?

java - 如何创建像新的 YouTube 应用程序一样的多任务视频 Activity ?

java - 逐行从文本中读取 int

linux - 在文件系统中创建文件

通过改变头内容(以太,网络层)并在ubuntu中使用pcap_inject(C程序)转发数据包