私はWindowsでJnotifyを使用しました。DLLファイルをSYSTEMFOLDERとSYSTEM32にコピーし、ビルドパスにJnotify.jar を含めました。この手順は正常に機能します。そして私はjnoitifyが提供するWindowsシステムのすべての通知を受け取ります。
今、私はjnotifyをUbuntLinuxで動作させたいと思っています。どのような手順に従うべきか教えてください。JavaクラスパスにJnoitify.jarを含めました。しかし、それは機能しません。
上記に従うことにより、以下の例外が発生します。
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)