3

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
NotCamelCase
  • 1,073
  • 1
  • 10
  • 18

1 Answers1

3

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.

Jan Goyvaerts
  • 2,913
  • 4
  • 35
  • 48
  • I did not really understand how this issue was solved by itself but it somehow just happened. Thanks for answer, though. – NotCamelCase Feb 25 '12 at 12:59
  • You probably installed the ia32_libs package. When that package is installed the 32bit jvm's DO work. :-) – Jan Goyvaerts Feb 25 '12 at 17:08
  • @JanGoyvaerts It's "ia32-libs" (dash, not underscore). Some people will not want to run the 64 bit JVM. – Joshua Davis May 03 '12 at 19:15
  • Sorry about the underscore. :-) Now, unfortunately I've seen there's not much performance difference any more between 32bit and 64bit. Probably because the recent 64bits use compressed references by default. – Jan Goyvaerts May 04 '12 at 08:11