SCIENTIFIC-LINUX-DEVEL Archives

November 2008

SCIENTIFIC-LINUX-DEVEL@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
John Summerfield <[log in to unmask]>
Reply To:
John Summerfield <[log in to unmask]>
Date:
Fri, 14 Nov 2008 10:10:41 +0900
Content-Type:
text/plain
Parts/Attachments:
text/plain (53 lines)
Michel Jouvin wrote:
> Troy,
> 
> This is mainly because most Java apps are pure Java and don't use JNI. 
> But if you use JNI inside your application, I don't think the API allows 
> you to select the arch, thus you use the default one wich depends on 
> something I don't know! I just know that if you have the 64-bit Java 
> installed you cannot use 32-bit libs and vice versa.

At some point there has to be an executable file, and that will be 
32-bit or 64-bit. That determines which libraries are used.

I have two SL systems right here, one 32-bit and one pure 64-bit.
09:13 [summer@numbat ~]$ file $(locate \*/java) | grep ELF
/usr/java/jdk1.5.0_16/bin/java:                   ELF 32-bit LSB 
executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, 
dynamically linked (uses shared libs), for GNU/Linux 2.2.5, stripped
/usr/java/jdk1.5.0_16/jre/bin/java:               ELF 32-bit LSB 
executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, 
dynamically linked (uses shared libs), for GNU/Linux 2.2.5, stripped
/usr/java/jre1.6.0_07/bin/java:                   ELF 32-bit LSB 
executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, 
dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped

As you can see, those binaries are 32-bit while these following are not:
09:15 [summer@bobtail ~]$ file $(locate \*/java) | grep ELF
/usr/java/jdk1.5.0_16/bin/java:                     ELF 64-bit LSB 
executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, 
dynamically linked (uses shared libs), for GNU/Linux 2.4.0, stripped
/usr/java/jdk1.5.0_16/jre/bin/java:                 ELF 64-bit LSB 
executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, 
dynamically linked (uses shared libs), for GNU/Linux 2.4.0, stripped
09:16 [summer@bobtail ~]$

Despite what someone else has said, I don't believe rpm allows both to 
be installed at the same time. There is some magic that would allow it:
09:13 [summer@numbat ~]$ file $(locate \*/java) | grep sym
/etc/alternatives/java:                           symbolic link to 
`/usr/lib/jvm/jre-1.5.0-sun/bin/java'
/usr/bin/java:                                    symbolic link to 
`/etc/alternatives/java'
/usr/lib/jvm/java:                                symbolic link to 
`/etc/alternatives/java_sdk'
/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/bin/java: symbolic link to 
`/usr/bin/gij'
/usr/lib/jvm-exports/java:                        symbolic link to 
`/etc/alternatives/java_sdk_exports'
09:14 [summer@numbat ~]$

but the java packages need to be constructed in a way that allows this 
to be done, and they are not quite_ they allow different java 
implementations, but not different architectures.

ATOM RSS1 RSS2