无法在64位JVM上加载32位SWT库 [英] Cannot load 32-bit SWT libraries on 64-bit JVM

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

问题描述

我的计算机是win7 64位,而jdk是1.7.0.21,jvm是1.6 ..和64位 我想 运行SWT应用程序并导出为可运行的jar文件 .当我运行该应用程序时,它的一个例外是无法在64位JVM上加载32位SWT库,因此我将SDK作为备用jre导入,就像您指向

My computer is win7 64 bit, and jdk is 1.7.0.21,jvm is 1.6.. and 64 bit I want to run SWT application and export as runnable jar file. When I run the application, it has the exception that Cannot load 32-bit SWT libraries on 64-bit JVM, so I import the SDK as alternate jre just like you point at Cannot load 64-bit SWT libraries on 32-bit JVM ( replacing SWT file ), and in Eclipse, the application can run correctly, but when I edit the bat file to run the jar file, it always has the problem like Cannot load 32-bit SWT libraries on 64-bit JVM, I have the swt.jar for 64 bit, but I don't konw how to replace and I wanna edit the bat file with the information with the SDK. How to handle the problem?

推荐答案

您拥有64位JVM,因此它不会运行32位SWT库.您需要:

You have a 64bit JVM so it won't run the 32-bit SWT libraries. You need to either:

  1. 下载并安装32位JVM,并更改项目的设置以运行32位JVM,而不是64位JVM.
  2. 改为下载并安装64位库.

上一个SO问题对带有附图的第一个选项有很好的描述:

This previous SO question has a great description of the first option with accompanying diagrams:

无法加载64 32位JVM上的位SWT库(替换SWT文件)

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

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