I’m trying to run a 32bit Hotspot JVM on a 64bit Debian Mint machine. At first sight it all works until you’ll try to run something using Swing:
java.lang.UnsatisfiedLinkError: /opt/javadev/jdk1.7.0_03_32b/jre/lib/i386/xawt/libmawt.so:
libXext.so.6: cannot open shared object file: No such file or directory
Adding that to the library path: export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu.
But then it gives this error:
java.lang.UnsatisfiedLinkError: /opt/javadev/jdk1.7.0_03_32b/jre/lib/i386/xawt/libmawt.so:
libXext.so.6: wrong ELF class: ELFCLASS64
Any idea what else has to be done here ?
To be able to use the 32-bit JVM, you’ll need to have the 32-bit compatibility libraries installed. The second error message means that the 32-bit JVM process is trying to load a 64-bit library; that doesn’t work.
On Ubuntu you’d have to install the package
ia32-libs, which contains the 32-bit compatibility libraries for 64-bit Ubuntu.UPDATE: Ubuntu 13.10 introduced multi-arch which replaced
ia32-libswithlibstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386. Source: https://stackoverflow.com/a/10473415/14731