You are not logged in.

#1 2009-10-16 05:47:15

blakeman8192
Member
From: Earth
Registered: 2009-09-19
Posts: 7

[SOLVED]: Arch64 with a 32-bit JRE

Hey guys, I'll get right to the point.
I need to run a 32 bit JVM for certain situations on this machine due to a bug with the 64 bit JRE on Linux (not Arch related).

I have tried to install the "jre-6u16-linux-i586" binary file - which did not work ("failed to extract") until after I installed the bin32-jre package from the AUR - on the official Java website. After that originally didn't work I tried using the AUR to install bin32-jre but now whenever I try to use either one of the two I get the following exception:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/blake/abs/bin32-jre/pkg/opt/bin32-jre/jre/lib/i386/xawt/libmawt.so: libXi.so.6: wrong ELF class: ELFCLASS64
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1674)
    at java.lang.Runtime.load0(Runtime.java:770)
    at java.lang.System.load(System.java:1003)
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695)
    at java.lang.Runtime.loadLibrary0(Runtime.java:823)
    at java.lang.System.loadLibrary(System.java:1028)
    at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.awt.NativeLibLoader.loadLibraries(NativeLibLoader.java:38)
    at sun.awt.DebugHelper.<clinit>(DebugHelper.java:29)
    at java.awt.Component.<clinit>(Component.java:560)
Could not find the main class: client.  Program will exit.

After that first happened with the bin32-jre, I tried to install the authentic Java package (again) and it extracted and installed properly (unlike the other times) but still gives me the exact same (same paths and everything) exception whenever I try to use it.

I'm at my wits end trying to figure this out, so I'd really appreciate your help.
Thanks guys,
-Blake

EDIT:
As a last resort, I installed a bundled 32 bit system and installed JRE via pacman inside the system (I made sure to chroot inside of it). Pacman installed the 64 bit version of the JRE and now I'm getting an UnsatisfiedLinkError whenever I try to use java because it's looking for 32-bit binaries that aren't there (there's an amd64 folder instead of an i386 one that it's looking for).
Here's the error I'm getting within the bundled 32 bit system:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/java/jre/lib/i386/xawt/libmawt.so: libXi.so.6: cannot open shared object file: No such file or directory
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1674)
    at java.lang.Runtime.load0(Runtime.java:770)
    at java.lang.System.load(System.java:1003)
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695)
    at java.lang.Runtime.loadLibrary0(Runtime.java:823)
    at java.lang.System.loadLibrary(System.java:1028)
    at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.awt.NativeLibLoader.loadLibraries(NativeLibLoader.java:38)
    at sun.awt.DebugHelper.<clinit>(DebugHelper.java:29)
    at java.awt.Component.<clinit>(Component.java:560)
Could not find the main class: client.  Program will exit.

EDIT:
Solved it by adding the 32 bit VM to my PATH inside the chroot. Much thanks to derrida and jelly12gen for the assistance via IRC.
Execute this command as root inside the bundled 32 bit system chroot:

export PATH="opt/java/bin:$PATH"

I was unable to get it to work inside the 64 bit installation, but running it inside the chroot works just fine.

Last edited by blakeman8192 (2009-10-16 08:34:16)

Offline

Board footer

Powered by FluxBB