Re: Java: Could not reserve enough space for object heap [message #7070 is a reply to message #7057] |
Tue, 03 October 2006 03:24 |
ckpeter
Messages: 8 Registered: October 2006
|
Junior Member |
|
|
I have had this problem in the past. The reason why Java complains is because on start up, it sees that the machine has more than 2 GB of RAM, so it starts up in server mode, which tries to allocate all the memory, which then fails because it is inside a VPS.
You can manually specify -Xmx256m on the command line every time you start Java to avoid Java trying to allocate all the memory.
If you want something more seamless, go under the /usr/java/jdk/jre/lib/i386, delete server, and symlink server to client. This is a sneaky way of changing the server VM to the client VM, but it works very well (as long as you don't need the server VM).
|
|
|