NetBeans 7.1 构建错误:java.lang.UnsatisfiedLinkError libXtst.so.6:错误的 ELF 类:ELFCLASS64

发布于 12-27 07:07 字数 1235 浏览 5 评论 0原文

由于 NetBeans 7.1 上出现以下错误,我无法使用 jdk 1.7.0 构建我的项目,而同一项目在使用 jdk 1.7.0 的 Eclipse 上运行良好。有谁知道我该如何解决这个问题?

Output:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/jvm/jdk.1.7.0/jre/lib/i386/xawt/libmawt.so:         libXtst.so.6: wrong ELF class: ELFCLASS64
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1928)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1825)
at java.lang.Runtime.load0(Runtime.java:792)
at java.lang.System.load(System.java:1059)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1928)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1846)
at java.lang.Runtime.loadLibrary0(Runtime.java:845)
at java.lang.System.loadLibrary(System.java:1084)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:67)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:47)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1648)
at java.awt.Toolkit.<clinit>(Toolkit.java:1670)
at java.awt.Component.<clinit>(Component.java:595)
Java Result: 1

I can't build my project using jdk 1.7.0 due to following error on NetBeans 7.1 whereas the same one works well on Eclipse with jdk 1.7.0. Does anyone know how can I resolve this issue ?

Output:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/jvm/jdk.1.7.0/jre/lib/i386/xawt/libmawt.so:         libXtst.so.6: wrong ELF class: ELFCLASS64
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1928)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1825)
at java.lang.Runtime.load0(Runtime.java:792)
at java.lang.System.load(System.java:1059)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1928)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1846)
at java.lang.Runtime.loadLibrary0(Runtime.java:845)
at java.lang.System.loadLibrary(System.java:1084)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:67)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:47)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1648)
at java.awt.Toolkit.<clinit>(Toolkit.java:1670)
at java.awt.Component.<clinit>(Component.java:595)
Java Result: 1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

二智少女2025-01-03 07:07:37

这是因为您在 64 位平台上运行 32 位 JVM。安装 64 位 JDK 就可以了。我有同样的错误,因为我正在尝试运行 32 位 JDK。 :-)

我只能猜测 Eclipse 工作的原因。但在我看来,当尝试使用 Swing 运行某些东西时会发生这种情况。 Netbeans 确实如此。然而 Eclipse 运行 SWT;它自己的 GUI 包。

That's because you're running a 32bit JVM on a 64bit platform. Install the 64bit JDK and you're off. I have the same errors because I'm trying to run a 32bit JDK. :-)

I can only guess as to why Eclipse works. But it looks to me that this happens when trying to run something using Swing. Netbeans does. Eclipse however runs SWT; its own gui package.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文