jdk编译器对内存的支持不同client状态和server状态不同后者支持更大些操作系统不同也存在不同位操作系统就比位操作系统大 测试方法在命令行下用 java XmxXXXXM version 命令来进行测试然后逐渐的增大XXXX的值如果执行正常就表示指定的内存大小可用否则会打印错误信息 如 C:\>java client XmxM version java version _″ Java(TM) SE Runtime Environment (build _b) Java HotSpot(TM) Client VM (build b mixed mode) C:\>java client XmxM version java version _″ Java(TM) SE Runtime Environment (build _b) Java HotSpot(TM) Client VM (build b mixed mode) C:\>java client XmxM version Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine C:\>java server XmxM version Error: no `server JVM at `C:\Program Files\Java\jre_\bin\server\jvmdll java编译器client和server状态改变方法 C:\Program Files\Java\jdk_\jre\lib\i\jvmcfg 打开 client KNOWN server KNOWN hotspot ALIASED_TO client classic WARN native ERROR green ERROR 调整为 server KNOWN client KNOWN hotspot ALIASED_TO client classic WARN native ERROR green ERROR 即可支持更多的内存 |