gpt4 book ai didi

java - 线程 "UI Thread"java.lang.UnsatisfiedLinkError : 中出现异常

转载 作者:行者123 更新时间:2023-12-01 23:21:50 26 4
gpt4 key购买 nike

堆栈跟踪是:

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 Thread"java.lang.UnsatisfiedLinkError : 中出现异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20520590/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com