2013-05-28 57 views
0

我的應用程序是從NetBeans正常運行,但分佈式jar文件出現問題。運行分佈式jar時java.lang.UnsatisfiedLinkError

我讀過很多類似的文章沒有任何運氣。

感謝您的任何想法如何解決這個問題!

C:\Users\dennis>java -jar "C:\Users\dennis\Documents\JavaApplication1\dist\JavaApplication1.jar" 
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: Native library not found. Tried to load tibrvnativesd64 and tibrvnativesd 
     at com.tibco.tibrv.Tibrv.loadNativeLibrary(Tibrv.java:392) 
     at com.tibco.tibrv.Tibrv.<clinit>(Tibrv.java:79) 
     at COM.TIBCO.hawk.console.nest.shared.TibrvProxy.open(TibrvProxy.java:33) 
     at COM.TIBCO.hawk.console.hawkeye.AgentMonitor.initialize(AgentMonitor.java:342) 
     at javaapplication1.TrayIconDemo.createHawkConsole(TrayIconDemo.java:122) 
     at javaapplication1.TrayIconDemo.access$100(TrayIconDemo.java:15) 
     at javaapplication1.TrayIconDemo$1.run(TrayIconDemo.java:52) 
     at java.awt.event.InvocationEvent.dispatch(Unknown Source) 
     at java.awt.EventQueue.dispatchEventImpl(Unknown Source) 
     at java.awt.EventQueue.access$000(Unknown Source) 
     at java.awt.EventQueue$3.run(Unknown Source) 
     at java.awt.EventQueue$3.run(Unknown Source) 
     at java.security.AccessController.doPrivileged(Native Method) 
     at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) 
     at java.awt.EventQueue.dispatchEvent(Unknown Source) 
     at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) 
     at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) 
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) 
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source) 
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source) 
     at java.awt.EventDispatchThread.run(Unknown Source) 
Caused by: java.lang.UnsatisfiedLinkError: C:\tibco\tibrv\8.4\bin\tibrvnativesd.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform 
     at java.lang.ClassLoader$NativeLibrary.load(Native Method) 
     at java.lang.ClassLoader.loadLibrary0(Unknown Source) 
     at java.lang.ClassLoader.loadLibrary(Unknown Source) 
     at java.lang.Runtime.loadLibrary0(Unknown Source) 
     at java.lang.System.loadLibrary(Unknown Source) 
     at com.tibco.tibrv.Tibrv.loadNativeLibrary(Tibrv.java:389) 
     ... 20 more 

回答

0

我發現瞭解決這個問題,這是非常簡單的。

就我而言,NetBeans使用java 32位,但命令提示符默認情況下使用java 64版本。

當我在命令提示符中明確指出java 32位時,它工作正常。

0

tibrvnativesd.dll文件顯然爲32位機器/ OS創建的,而該機器在其上,試圖加載運行該應用程序是一個64位的機/ OS。

要麼找到/創建64位comaptible DLL或32位計算機上運行它...

+0

嗯..它是如何在NetBeans內部正常工作的呢? – user955732

相關問題