Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

java - Could not reserve enough space for object heap to start JVM

Just faced with strange issue. When i type

java -version

i got

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

.

java -Xms64m -Xmx64m -version

This command works fine

java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode)

If i change xms, xmx to 128m, i get error again.

Using top command and free -m i can see, that i got over 192 mb free, so why i still get this error ?

Mem:    262144k total,    64760k used,   197384k free,        0k buffers
Swap:        0k total,        0k used,        0k free,        0k cached

Thank you

See Question&Answers more detail:os

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

1 Answer

0 votes
by (71.8m points)

I had the same problem when using a 32 bit version of java in a 64 bit environment. When using 64 java in a 64 OS it was ok.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...