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-libs
with libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
. Source: https://stackoverflow.com/a/10473415/14731
I just had the same issue on Ubuntu 14.04, where I wanted to keep my 32-bit Oracle Java on a 64-bit install. ia32-libs is gone since Ubuntu 13.10, and now the glib answer is "just download the i386 libraries that you need". Unfortunately, there doesn't seem to be an easy way to find out which libraries those are.
The simple remedy is to install 32-bit OpenJDK as
sudo apt-get install openjdk-7-jdk:i386
That pulls in a large number of i386 libraries. You can uninstall the OpenJDK again if you like, but I left it in place so I don't accidentally autoremove the libraries.
Put Oracle JDK on the PATH, and now Eclipse and NetBeans will start up fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With