Could not reserve enough space for object heap to start JVM

前端 未结 3 1522
醉酒成梦
醉酒成梦 2020-12-06 04:52

Just faced with strange issue. When i type

java -version

i got

Error occurred during initialization of VM
Could not reserve         


        
3条回答
  •  北荒
    北荒 (楼主)
    2020-12-06 05:16

    It looks like the machine you're trying to run this on has only 256 MB memory.

    Maybe the JVM tries to allocate a large, contiguous block of 64 MB memory. The 192 MB that you have free might be fragmented into smaller pieces, so that there is no contiguous block of 64 MB free to allocate.

    Try starting your Java program with a smaller heap size, for example:

    java -Xms16m ...
    

提交回复
热议问题