Search code examples
javacpu-architecturedynamic-loading.so

Loading a 32bit .so library in a 64bit JVM


We are developing a Java application to be run on Linux environments (Ubuntu for now) which communicates with a piece of hardware. Said hardware uses a .so library made available by the manufacturer for x86 architectures only.

The thing is, we would very much like to run this on a 64bit JVM. Loading the library in a x86 JVM works fine but we cannot load on the 64bit version. So, besides switching to a x86 JVM, are there any other ways to make this lib available to my 64 bit Java application? Is it possible, for instance, for me to write another os wrapper library in x64 that, in turn calls the x86 version so the JVM can load my 64 bit wrapper?


Solution

  • No.

    You can not load a 32-bit library into the address space of a 64-bit process.