Thứ Sáu, 7 tháng 4, 2017

Linux Installer: ^Could not reserve enough space for object heap^ page 1

bmaker
12-17-2009, 03:13 PM
Just downloaded Altitude's linux client, but I'm encountering a problem executing the installer:
-[root@xxx](/opt/altitude) ./altitude.sh
Unpacking JRE ...
Preparing JRE ...
Starting Installer ...
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
-[root@xxx](/opt/altitude) ./altitude.sh -c
Unpacking JRE ...
Preparing JRE ...
Starting Installer ...
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

128 MB and more should be available exclusively for altitude. Thus it is rather not a matter of having not enough memory.

Operating system: Ubuntu 8.04
User account: root (as long as altitude doesnt run at all)

What else to mention?

Help is appreciated.

Best regards, bmaker
bmaker
12-17-2009, 07:21 PM
After 4 hours I got it working:
On many virtual servers java is too greedy regarding memory usage, because there seems to be a lot of free memory, which is in fact used by the other virtual server instances on the same machine.

This problem can be fixed by manually setting the maximum heapsize with the parameter "-Xmx128m" (meaning "heapsize maximum is 128 megabyte"). E.g. instead of "java -version" you now write "java -Xmx128m -version".

Of course it is a pain and sometimes impossible to add this parameter to each java call. So you can set the environment variable _JAVA_OPTIONS by executing the following command:
export _JAVA_OPTIONS="-Xmx128m"
This adds "-Xmx128m" to each java call automatically.

And finally it also helped me to get altitude working.

Note:
The export-command above does only set _JAVA_OPTIONS for the current session. After you logout the setting will no more be in effect.
However, on Ubuntu you can make environment variables permanent by editing the file /etc/environment.
Other linux distributions might also have this file... but I am not sure.

Không có nhận xét nào:

Đăng nhận xét