背景: idea 运行java项目,报错:
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Error occurred during initialization of VM
Unable to allocate 129600KB bitmaps for parallel garbage collection for the requested 4147200KB heap.
Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled.
Java HotSpot(TM) 64-Bit Server VM warning: Try increasing the code cache size using -XX:ReservedCodeCacheSize=
内存不足,无法正常启动。
解决办法是:
提高虚拟内存。
操作步骤:
系统》高级系统设置》系统属性
》高级(页签)》性能,点击设置
》性能选项,点击高级》虚拟内存,点击更改
》选择自定义大小,填写初始大小、最大值
》保存。