stacktrace是:
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>
最佳答案
您的堆栈跟踪显示“ java.library.path中没有swt-win32-3232”,并且在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>
关于java - 线程“UI线程” java.lang.UnsatisfiedLinkError中的异常:,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/20520590/