Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
408 views
in Technique[技术] by (71.8m points)

java - 无法为对象堆保留足够的空间(Could not reserve enough space for object heap)

I am getting the following exception repeatedly each time I try to run the program.

(每次尝试运行该程序时,我都会反复收到以下异常。)

Error occurred during initialization of VM

(VM初始化期间发生错误)

Could not reserve enough space for object heap

(无法为对象堆保留足够的空间)

Could not create the Java virtual machine.

(无法创建Java虚拟机。)

I tried to increase my virtual memory (page size) and RAM size, but to no avail.

(我试图增加虚拟内存(页面大小)和RAM大小,但无济于事。)

How can I eliminate this error?

(如何消除此错误?)

  ask by Narendra translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

使用-XX:MaxHeapSize=512m (或需要的任何大数)(或简称-Xmx512m )运行JVM


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...