"LoadLibrary" of a 32 bit so with 64 bit java on a 64 bit machine

M

markryde

Hello,

I have an x86_64 linux machine.

The java installed there is Sun java for linux (64 bit version- Linux
x64 Platform
- Java(TM) SE Development Kit 6)

I have a library (.so) which includes JNI calls.
This library was compiled on a 32 bit machine and I don't have it's
sources.
When running a jar in the usual way, if I try "LoadLibrary" on this
machine
from the java code I get an error.

Is there a way to run the jar in "32 bit mode" on this machine with
this
64 bit java ?
Which flag to the "java" command should I pass in order to achive this
?

Or is the only way to do this is install a 32 bit version of Java on
this
machine and run the jar from this 32 bit environment ?

Regards,
Mark
 
L

Laurent D.A.M. MENTEN

I am affraid the is no solution but to install a 32bits JVM

Hello,

I have an x86_64 linux machine.

The java installed there is Sun java for linux (64 bit version- Linux
x64 Platform
- Java(TM) SE Development Kit 6)

I have a library (.so) which includes JNI calls.
This library was compiled on a 32 bit machine and I don't have it's
sources.
When running a jar in the usual way, if I try "LoadLibrary" on this
machine
from the java code I get an error.

Is there a way to run the jar in "32 bit mode" on this machine with
this
64 bit java ?
Which flag to the "java" command should I pass in order to achive this
?

Or is the only way to do this is install a 32 bit version of Java on
this
machine and run the jar from this 32 bit environment ?

Regards,
Mark


--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d--- s: a C++ UL+++ P-- L+++ E--- W++ N++ o-- K-- w---
O- M- V- PS+ PE-- Y+ PGP- t 5 X+++ R* tv++ b+ DI++ D--
G e++ h--- r+++ y+++
------END GEEK CODE BLOCK------
 
T

Tom Hawtin

Is there a way to run the jar in "32 bit mode" on this machine with
this
64 bit java ?
Which flag to the "java" command should I pass in order to achive this
?

You will need a 32-bit version. If both the 32 and 64-bit versions are
installed in the same place, -d32 (and -d64) will switch between
i386/i586 and AMD64 architectures.

Tom Hawtin
 
T

Timothy Bendfelt

Depending on what the library does you could use a peer 32-bit process
and try an IPC solution. More complicated but if thats all you've got to
work with it may be a solution.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top