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.
|