OpenCV毫无理由地停止工作

时间:2015-12-10 13:57:44

标签: opencv libraries javacv

我在Java中创建了一个在NetBeans IDE中使用OpenCV(javaCV)库的应用程序。一切都工作正常约0.5年,昨天没有理由停止连接到openCV库(看起来OpenCV不再配置好了)。最奇怪的是,这个程序的3个副本被我的朋友使用(在Windows 8,Windows XP和Mac OS X上),并且它们现在都具有与库错误相同的连接。这个应用程序没有以任何方式连接到互联网,我也从来没有对它进行任何更新,所以我觉得每个副本都停止工作非常奇怪:(

错误讯息:

Exception in thread "AWT-EventQueue-0"       java.lang.UnsatisfiedLinkError: no jniopencv_highgui in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:711)
at com.googlecode.javacpp.Loader.load(Loader.java:586)
at com.googlecode.javacpp.Loader.load(Loader.java:540)
at com.googlecode.javacv.cpp.opencv_highgui.<clinit>(opencv_highgui.java:79)
at Program.Core.Find(Core.java:64)
at Program.Core.FindActionPerformed(Core.java:516)
at Program.Core.access$000(Core.java:25)
at Program.Core$1.actionPerformed(Core.java:414)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
      Caused by: java.lang.UnsatisfiedLinkError: /private/var/folders/2x/p7_dz5n931d4bmbbjw68d5z00000gn/T/javacpp1445446196924953000/libjniopencv_highgui.dylib: dlopen(/private/var/folders/2x/p7_dz5n931d4bmbbjw68d5z00000gn/T/javacpp1445446196924953000/libjniopencv_highgui.dylib, 1): Library not loaded: @rpath/libopencv_highgui.2.4.dylib
        Referenced from: /private/var/folders/2x/p7_dz5n931d4bmbbjw68d5z00000gn/T/javacpp1445446196924953000/libjniopencv_highgui.dylib
                Reason: no suitable image found.  Did find:
/private/var/folders/2x/p7_dz5n931d4bmbbjw68d5z00000gn/T/javacpp1445446196924953000/./libopencv_highgui.2.4.dylib: malformed mach-o image: load command #22 length (0) too small in /private/var/folders/2x/p7_dz5n931d4bmbbjw68d5z00000gn/T/javacpp1445446196924953000/./libopencv_highgui.2.4.dylib
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1851)
at java.lang.Runtime.load0(Runtime.java:795)
at java.lang.System.load(System.java:1062)
at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:700)
... 43 more
       Java Result: 128
      BUILD SUCCESSFUL (total time: 16 seconds)

0 个答案:

没有答案