Eclipse - 无法在 64 位 JVM 上加载 32 位 SWT 库 [英] Eclipse - Cannot load 32-bit SWT libraries on 64-bit JVM
问题描述
我正在尝试运行一个名为 To-Do-O 的 Java 项目(来源 - http://www.ohloh.net/p/to-do-o/enlistments) 在我将项目加载到 Eclipse 并运行 main.java 后,它返回以下错误:
I'm trying to run a java project called To-Do-O (source - http://www.ohloh.net/p/to-do-o/enlistments) After I loaded the projects into Eclipse and run the main.java, it returns the following error:
线程main"中的异常java.lang.UnsatisfiedLinkError:不能在 64 位 JVM 上加载 32 位 SWT 库
Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM
我尝试添加 -d32,因为许多解决方案建议 [see iamge],但它返回了另一条消息
I tried adding -d32 as many of the solution suggests [see iamge], but it returns another message
错误:此 java 实例不支持 32-bti JVM.请安装所需的版本.
Error: This java instance does not support a 32-bti JVM. Please install the desired version.
有人解决了吗??
推荐答案
参考 http://eclipse.1072660.n5.nabble.com/SWT-libraries-on-64-bit-JVM-td91066.html您应该下载 SWT 64 位,或者使用 -d32 选项运行 JVM.如果您使用的是带有 java 7 或 8 的 mac,您可能会收到一条错误消息:此 Java 实例不支持 32 位 JVM".当然,没有什么可以限制您使用旧的 Java 版本:
Referring to http://eclipse.1072660.n5.nabble.com/SWT-libraries-on-64-bit-JVM-td91066.html You should either download SWT 64 bit, or run JVM with -d32 option. If you are on a mac, with java 7 or 8, you might get an error message: "This Java instance does not support a 32-bit JVM". Of course nothing restricts you from using an old java version:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -d32 ...
这篇关于Eclipse - 无法在 64 位 JVM 上加载 32 位 SWT 库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!