线程“main”中的异常java.lang.UnsatisfiedLinkError:java.library.path中没有swt-win32-3346
我尝试在 Mac OS 中使用 Elipse + MJT + Jave_ME_SDK_3.0 通过 KEmulator 运行 j2me 项目,它显示如下错误:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-win32-3346 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1758)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1045)
at emulator.i.a(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
at emulator.ui.swt.b.<init>(Unknown Source)
at emulator.Emulator.main(Unknown Source)
该项目在 Windows 系统上运行成功,我该如何解决此问题?
I trying to run a j2me project by KEmulator with Elipse + MJT + Jave_ME_SDK_3.0 in Mac OS , it display an error like this:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-win32-3346 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1758)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1045)
at emulator.i.a(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
at emulator.ui.swt.b.<init>(Unknown Source)
at emulator.Emulator.main(Unknown Source)
The project is success to run on Windows system ,How can I fix this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该错误表明它无法找到 SWT 本机 Windows 库。鉴于您使用的是 MacOS,我不确定它们到底有什么好处。也许模拟器使用它们?
这些库捆绑到 Windows 版本的 SWT 中。你的类路径上有 swt.jar 吗?如果您尝试使用以下位置的 Windows 版本运行,会发生什么情况: http://www.eclipse.org/swt/
That error suggests it is not able to find the SWT native Windows libraries. Given that you are using MacOS I'm not sure what good they would be anyway. Perhaps the emulator uses them?
The libraries are bundled into the Windows version of SWT. Do you have an swt.jar on your classpath? What happens if you try running with the Windows version from: http://www.eclipse.org/swt/