b、装载jvm.cfg虚拟机动态连接库配置文件是通过java.c中函数:ReadKnownVMs实现 的。 该函数首先组合jvm.cfg文件的绝对路径,JRE路径+/lib+/ARCH(CPU构架)+/jvm.cfg ARCH(CPU构架)的判定是通过java_md.c中GetArch函数判定的,该函数中windows平 台只有两种情况:WIN64的‘ia64’,其他情况都为‘i386’。我的为i386所以jvm.cfg 文件绝对路径为:“D:/java/j2sdk1.4.2_04/jre/lib/i386/jvm.cfg”。文件内容如 下: ## @(#)jvm.cfg 1.7 03/01/23# # Copyright 2003 Sun Microsystems, Inc. All rights reserved.# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.# # ### List of JVMs that can be used as an option to java, javac, etc.# Order is important -- first in this list is the default JVM.# NOTE that this both this file and its format are UNSUPPORTED and# WILL GO AWAY in a future release.## You may also select a JVM in an arbitrary location with the# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported# and may not be available in a future release.#-client KNOWN-server KNOWN-hotspot ALIASED_TO -client-classic WARN-native ERROR-green ERROR