2013-12-11 117 views
0

堆棧跟蹤是:異常在線程 「UI線程」 java.lang.UnsatisfiedLinkError中:

Exception in thread "UI Thread" java.lang.UnsatisfiedLinkError: no swt-win32-3232 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 org.eclipse.swt.internal.Library.loadLibrary(Library.java:123) 
     at org.eclipse.swt.internal.win32.OS.<clinit>(OS.java:18) 
     at org.eclipse.swt.widgets.Display.<clinit>(Display.java:125) 
     at com.sdm.hw.client.resource.RegistryBase.<init>(RegistryBase.java:16) 
     at com.sdm.hw.client.resource.ImageRegistry.<init>(ImageRegistry.java:12) 
     at com.sdm.hw.client.resource.StaticImageRegistry.<init>(StaticImageRegistry.java:12) 
     at com.sdm.hw.client.resource.ResourceRegistry.getStaticImageRegistry(ResourceRegistry.java:89) 
     at com.sdm.hw.client.resource.ResourceRegistry.getImage(ResourceRegistry.java:41) 
     at com.sdm.hw.client.resource.ResourceRegistry.getImage(ResourceRegistry.java:33) 
     at com.sdm.hw.client.action.HwAction.newImage(HwAction.java:190) 
     at com.sdm.hw.client.action.HwAction.setImageName(HwAction.java:152) 
     at com.sdm.hw.client.action.HwAction.localizeImages(HwAction.java:144) 
     at com.sdm.hw.client.action.HwAction.<init>(HwAction.java:94) 
     at com.sdm.hw.client.action.CloseAction.<init>(CloseAction.java:18) 
     at com.sdm.hw.client.core.Application.createApplicationLevelActions(Application.java:554) 
     at com.sdm.hw.client.core.Application.init(Application.java:146) 
     at com.sdm.hw.client.HwMain.main(HwMain.java:81) 

項在pom.xml的是:

<dependency> 
      <groupId>com.sdm.hw</groupId> 
      <artifactId>SecurityClient</artifactId> 
      <version>0.0.1-SNAPSHOT</version> 
      <exclusions> 
       <exclusion> 
        <artifactId>x86</artifactId> 
        <groupId>org.eclipse.swt.win32.win32</groupId> 
       </exclusion> 


       <exclusion> 
        <artifactId>commons-codec</artifactId> 
        <groupId>commons-codec</groupId> 
       </exclusion> 
      </exclusions> 
     </dependency> 

回答

2

你的堆棧跟蹤說「不SWT-win32- 3232 in java.library.path「,在你的pom中它被明確排除。也許你應該嘗試包括它?!

更新

基於您的評論,請嘗試:

<dependency> 
     <groupId>com.sdm.hw</groupId> 
     <artifactId>SecurityClient</artifactId> 
     <version>0.0.1-SNAPSHOT</version> 
     <exclusions> 
      <exclusion> 
       <artifactId>commons-codec</artifactId> 
       <groupId>commons-codec</groupId> 
      </exclusion> 
     </exclusions> 
    </dependency> 
+0

我想: com.sdm。 hw SecurityClient 0.0.1-SNAP SHOT org.eclipse.swt.win32.win32公地編解碼器公地編解碼器,但它不工作 –

+0

看到我更新的答案。 –

1

我嘗試以下,現在它的工作:

<dependency> 
<groupId>org.eclipse.swt.win32</groupId> 
<artifactId>x86</artifactId> 
<version>3.5.1</version> 
</dependency> 
相關問題