Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > "LoadLibrary" of a 32 bit so with 64 bit java on a 64 bit machine

Reply
Thread Tools

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

 
 
markryde@gmail.com
Guest
Posts: n/a
 
      01-19-2007
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

 
Reply With Quote
 
 
 
 
Laurent D.A.M. MENTEN
Guest
Posts: n/a
 
      01-19-2007
I am affraid the is no solution but to install a 32bits JVM

http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> 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------
 
Reply With Quote
 
 
 
 
Tom Hawtin
Guest
Posts: n/a
 
      01-19-2007
(E-Mail Removed) wrote:
>
> 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
 
Reply With Quote
 
Timothy Bendfelt
Guest
Posts: n/a
 
      01-19-2007


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.

> I am affraid the is no solution but to install a 32bits JVM
>
> (E-Mail Removed) wrote:
> > 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
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to run 32 bit java dll on 64 bit machine Mahesh Gothi Windows 64bit 0 11-23-2009 05:12 PM
reading binary data from a 32 bit machine on 64 bit machine harijay Python 2 02-19-2009 08:31 PM
64 bit - Windows Liberty 64bit, Windows Limited Edition 64 Bit, Microsoft SQL Server 2000 Developer Edition 64 Bit, IBM DB2 64 bit - new ! vvcd Computer Support 0 09-17-2004 08:15 PM
64 bit - Windows Liberty 64bit, Windows Limited Edition 64 Bit,Microsoft SQL Server 2000 Developer Edition 64 Bit, IBM DB2 64 bit - new! Ionizer Computer Support 1 01-01-2004 07:27 PM



Advertisments