无法在 Windows 32 位上加载 SWT 库 [英] Could not load SWT library on Windows 32-bit

查看:53
本文介绍了无法在 Windows 32 位上加载 SWT 库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我几乎完成了在 Linux 上开发的一个 Java 项目.现在我需要在 Windows 上构建和测试它.所以我在 Windows XP 32 位上安装了 Eclipse,并导入了我的项目.项目的所有依赖项都在 lib 文件夹中的 jar 文件中,在 Linux 上一切正常,但在 Windows XP 上出现以下错误:

I am almost done with one Java project that I have been developing on Linux. Now I need to build and test it on Windows. So I have installed Eclipse on Windows XP 32-bit, and imported my project. All dependencies of project are in jar files in lib folder, and on Linux everything works well, but on Windows XP I get following error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
    no swt-pi-gtk-4234 in java.library.path
    no swt-pi-gtk in java.library.path
    Can't load library: C:Documents and Settingsfirzen.swtlibwin32x86swt-pi-gtk-4234.dll
    Can't load library: C:Documents and Settingsfirzen.swtlibwin32x86swt-pi-gtk.dll

    at org.eclipse.swt.internal.Library.loadLibrary(Library.java:331)
    at org.eclipse.swt.internal.Library.loadLibrary(Library.java:240)
    at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:22)
    at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
    at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
    at org.eclipse.swt.widgets.Display.<clinit>(Display.java:133)
    at gui.Frontend.<init>(Frontend.java:51)
    at Fighter.main(Fighter.java:18)

我已经搜索过这些 DLL,但没有找到.在哪里可以下载这些 DLL 文件?

I have searched for these DLLs, but I have failed to find them. Where can I download these DLL files?

提前致谢.

推荐答案

正确的 DLL 文件位于 swt.jar 中,适用于您的特定平台.您需要下载适用于 Windows(不是 x86_64)的 SWT,例如swt-4.2.1-win32-win32-x86.zip"来自 http://download.eclipse.org/eclipse/downloads/drops4/R-4.2.1-201209141800/#SWT.

Correct DLL files are inside swt.jar for your particular platform. You need to download SWT for Windows (not x86_64), e.g. "swt-4.2.1-win32-win32-x86.zip" from http://download.eclipse.org/eclipse/downloads/drops4/R-4.2.1-201209141800/#SWT.

看起来好像您尝试使用来自 linux SWT 的 swt.jar.那行不通.您需要为每个要支持的平台下载特定于平台的 SWT 包.

It looks as if you have tried to use swt.jar from linux SWT. That won't work. You need to download platform-specific SWT package For each platform that you want to support.

这篇关于无法在 Windows 32 位上加载 SWT 库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆