JVM加载共享库的过程是什么?

时间:2014-07-03 07:47:57

标签: java linux jvm

当在Linux机器上安装32位和64位本机共享库时,JVM如何选择要选择的内容,以及它如何实际知道选择哪一个?

1 个答案:

答案 0 :(得分:2)

程序javac和java已链接到使用某些库。只需运行如下命令:

ldd /extra/JDK8u5/jdk1.8.0_05/bin/java

linux-gate.so.1 =>  (0xb7846000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7819000)
libjli.so => /home/extra/JDK8u5/jdk1.8.0_05/bin/../lib/i386/jli/libjli.so (0xb7804000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb77ff000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb769c000)
/lib/ld-linux.so.2 (0xb7847000)