32位下JVM最大可用内存<4g
$ java -showversion -Xmx4g HelloWorld
Invalid maximum heap size: -Xmx6g
The specified size exceeds the maximum representable size.
Could not create the Java virtual machine.
所需内存超过4g,需开启64位标记
$ java -showversion -d64 -Xmx6g HelloWorld
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b04)
Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode)
Hello world!
Running a 64-bit JVM is not supported on this platform.
物理内存不够时会提示:
Error occorred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
Java运作64位程序?提问不够详细 Java是跨平台、跨 *** 作系统的,32位、64位肯定没有问题 关键安装64位的WINDOWS或LINUX系统,再安装对应的java安装包(运行环境)欢迎分享,转载请注明来源:内存溢出
评论列表(0条)