New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
OpenVZ and Sun JRE 7
I've created a test OpenVZ VPS with 1GB RAM (CentOS 6.3 64 bit) and installed Sun's Java 7 via RPM onto it.
When I try the command "java -version", it gives me this error:
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine
Error: A fatal exception has occurred. Program will exit.
Here are 2 screenshots of user_beancounters and htop to show that it shouldn't have a problem with not having enough memory:
http://puu.sh/1xwxB
http://puu.sh/1xwDl
Any help is appreciated.
Comments
Try
java -Xmx256m --version
.@gubbyte Same error
It should work. Done it a few times without problems.
Got it now, had to increase the privvmpages limit
Does Sun/Oracle Java have an RPM? As far as I know that's OpenJDK and there are differences between the 2 JVMs. Hence, you might experience differences in behavior.
@concerto49
A RPM is available on java.com for JRE 7u9
Cool - just making sure. Rarely look on java.com for JRE. Usually work with the JDK. There are slight difference, but glad it's good for ya.
As long as you're on a newer openvz kernel there should be no problems with Java, but if you're on the .18 series you'll have some pretty bad memory issues.
@Nikki No worries, I'm running the latest kernel
i just use openjdk on mine. is jrockit still available? that jvm is really good
It is but will soon be merged into OpenJDK.