当我使用双击时,我的 java 应用程序完美启动。我自己的路:
PATH=...C:\Program Files\Java\jdk1.7.0_02\bin;...
但是当我从 cmd 运行应用程序时:
C:\Program Files\Java\jdk1.7.0_02\bin>java.exe -jar C:\Users\zagorulkinde\Docume
nts\ps_client_lib\bin\Win32\GUItest.jar
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: C:\Window
s\System32\pc_client_lib.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(ClassLoader.java:1928)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1854)
at java.lang.Runtime.loadLibrary0(Runtime.java:845)
at java.lang.System.loadLibrary(System.java:1084)
at PC_client.lib.<clinit>(lib.java:10)
at settings.load(GUItest.java:342)
at GUItest.createAndShowGUI(GUItest.java:2681)
at GUItest.access$4100(GUItest.java:851)
at GUItest$22.run(GUItest.java:2728)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
at java.awt.EventQueue.access$000(EventQueue.java:101)
at java.awt.EventQueue$3.run(EventQueue.java:666)
at java.awt.EventQueue$3.run(EventQueue.java:664)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDo
main.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
ad.java:211)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
java:128)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:117)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
我正在尝试使用 x86 java 版本运行:
C:\Program Files (x86)\Java\jdk1.7.0_09\bin>java.exe -jar C:\Users\zagorulkinde\
Documents\ps_client_lib\bin\Win32\GUItest.jar
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no PC_cli
ent_lib in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
at java.lang.Runtime.loadLibrary0(Runtime.java:845)
at java.lang.System.loadLibrary(System.java:1084)
at PC_client.lib.<clinit>(lib.java:10)
at settings.load(GUItest.java:342)
at GUItest.createAndShowGUI(GUItest.java:2681)
at GUItest.access$4100(GUItest.java:851)
at GUItest$22.run(GUItest.java:2728)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:721)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:682)
at java.awt.EventQueue$3.run(EventQueue.java:680)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDo
main.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:691)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
ad.java:244)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
如果我试图指定 dll:
C:\Program Files (x86)\Java\jdk1.7.0_09\bin>java.exe -Djava.library.path="C:\Use
rs\zagorulkinde\Documents\ps_client_lib\bin\Win32\Pc_client_lib.dll" -jar C:\Use
rs\zagorulkinde\Documents\ps_client_lib\bin\Win32\GUItest.jar
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no PC_cli
ent_lib in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
at java.lang.Runtime.loadLibrary0(Runtime.java:845)
at java.lang.System.loadLibrary(System.java:1084)
at PC_client.lib.<clinit>(lib.java:10)
at settings.load(GUItest.java:342)
at GUItest.createAndShowGUI(GUItest.java:2681)
at GUItest.access$4100(GUItest.java:851)
at GUItest$22.run(GUItest.java:2728)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:721)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:682)
at java.awt.EventQueue$3.run(EventQueue.java:680)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDo
main.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:691)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
ad.java:244)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
我做错了什么?请帮忙。