There is insufficient memory for the Java Runtime Environment to continue.---vSphere Server的坑

前提条件:

  1. 工作环境中需要用到vmware vsphere server(version:6.7.0.42000)
  2. 由于机器初始配置8G已经无法满足工作需要,手动升级内存容量(8G--->16G)

问题现象

  1. java运行失败
[thread xxx also had an error]
[thread xxx also had an error]
...
...
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 32 bytes for AllocateHeap
# An error report file with more information is saved as:
# /xxx/xxx/hs_err_pidxxx.log

`

解决方法

  1. 设置-Xmx -Xms set _JAVA_OPTIONS=-Xms1024M -Xmx1024M (此方法无效)
  2. 请把内存容量改回去,java的运行环境就会正常了~~~(至今不知道改了内存之后如何保证正确的运行环境)