简体   繁体   English

SWT:UnsatisfiedLinkError,无法在32位JVM上加载x64 SWT库

[英]SWT: UnsatisfiedLinkError, cannot load x64 SWT library on 32-bit JVM

At first when developing my program I got this error the other way around; 起初,在开发程序时,我反过来遇到了这个错误。 it told me I couldn't use a 32-bit SWT library on a 64-bit JVM. 它告诉我,我不能在64位JVM上使用32位SWT库。 So I went and got the 64-bit library and used that. 因此,我去了64位库并使用了它。 Now when I run my program on a different computer, which has a 32-bit OS, it gives the error. 现在,当我在具有32位OS的另一台计算机上运行程序时,会出现错误。 Is there no way to make SWT run regardless of if you have 32 or 64 bit OS? 不管您使用的是32位还是64位操作系统,都无法使SWT运行吗?

You have to include both versions in your product, so that the correct one is available no matter what the architecture. 您必须在产品中包括这两个版本,以便无论采用哪种架构,都可以使用正确的版本。 You can also include Linux and Mac versions, to make your product truly portable. 您还可以包括Linux和Mac版本,以使您的产品真正可移植。

The build paths are different for each set of SWT libraries so you have to make separate versions for each operating system that you want your application to run on. 每个SWT库集的构建路径都不同,因此您必须为要运行应用程序的每个操作系统分别制定版本。 To do this, configure the build path so that only the JRE and platform-specific libraries are included, then make a runnable jar (Eclipse is excellent for this). 为此,请配置构建路径,以便仅包括JRE和特定于平台的库,然后制作一个可运行的jar(Eclipse非常适合此功能)。 It's tedious and goes against the Java paradigm, but its the only way (that I know of). 它很乏味并且与Java范式背道而驰,但这是唯一的方式(据我所知)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 java.lang.UnsatisfiedLinkError:无法在Windows x86机器上的32位JVM上加载64位SWT库 - java.lang.UnsatisfiedLinkError: Cannot load 64-bit SWT libraries on 32-bit JVM in Windows x86 machine java.lang.UnsatisfiedLinkError:无法在Windows中的64位JVM上加载32位SWT库 - java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM in windows 无法在 32 位 JVM 上加载 64 位 SWT 库(替换 SWT 文件) - Cannot load 64-bit SWT libraries on 32-bit JVM ( replacing SWT file ) 无法在32位JVM上加载64位SWT库(即使我下载了32位SWT) - Cannot load 64-bit SWT libraries on 32-bit JVM (even though I downloaded 32-bit SWT) 无法在64位JVM上加载32位SWT库 - Cannot load 32-bit SWT libraries on 64-bit JVM IntelliJ-无法在64位JVM上加载32位SWT库 - IntelliJ - Cannot load 32-bit SWT libraries on 64-bit JVM Eclipse-无法在64位JVM上加载32位SWT库 - Eclipse - Cannot load 32-bit SWT libraries on 64-bit JVM maven-surefire-plugin失败,错误为“无法在64位JVM上加载32位SWT库” - maven-surefire-plugin fails with error “Cannot load 32-bit SWT libraries on 64-bit JVM” Apex数据加载器 - 错误java.lang.UnsatisfiedLinkError:无法在64位JVM上加载32位SW T库 - Apex Data loader - Error java.lang.UnsatisfiedLinkError: Cannot load 32-bit SW T libraries on 64-bit JVM 使用32位JDK的Windows x64上的Tomcat - Tomcat on Windows x64 using 32-bit JDK
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM