Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to install Red5 on a vps running CentOS 5.7 in MediaTemple using this how-to (dv):Install Red5 Media Server but on step 7 I get this error:

/usr/local/red5/build.xml:217: The following error occurred while executing this line:
/usr/local/red5/build.xml:238: Error running /usr/lib/jvm/java-1.6.0-openjdk- compiler

Any idea how to fix it? Already Google and several users have had this same issue but none posted the solution or they never solved.

UPDATE: Some more details: running ant -v dist shows that is a memory problem:

Caused by: Cannot run program "/usr/lib/jvm/java-1.6.0-openjdk-": error=12, Cannot allocate memory
    at java.lang.ProcessBuilder.start(
    at java.lang.Runtime.exec(
    ... 32 more
Caused by: error=12, Cannot allocate memory
    at java.lang.UNIXProcess.<init>(
    at java.lang.ProcessImpl.start(
    at java.lang.ProcessBuilder.start(
    ... 37 more

and I defined _JAVA_OPTIONS="-Xms64m -Xmx128m" and export ANT_OPTIONS=-Xmx128m

and I tried with Xmx512m in both cases, no luck.


share|improve this question
Did you look in /usr/lib/jvm/java-1.6.0-openjdk- to see if the java compiler was installed there? –  Kev Oct 26 '11 at 21:59
Yes, javac is there. –  Julio Menendez Oct 27 '11 at 1:25
Is this VPS based on OpenVZ? I had an issue with Java and OpenVZ which looked like yours, in the end the only 2 solutions were either to use the IBM JDK or switch to a Xen VPS. See –  sebastianopilla Jul 30 '12 at 9:49

3 Answers 3

up vote 0 down vote accepted

You don't need to use javac to install Red5. I suggest downloading a tarball from un-archiving it and then running That is all you should need to do.

share|improve this answer

Check for reading and execution permissions for /usr/lib/jvm/java-1.6.0-openjdk- Ensure it has the read and execute bits for everyone (chmod a+rx /usr/lib/jvm/java-1.6.0-openjdk-

share|improve this answer
Come on @Mandx :) You know me better than that. Of course I checked that, yes, javac is executable by all users. –  Julio Menendez Oct 27 '11 at 12:13
I can't comment on the question because of my low rep in ServerFault, i didn't want to post this as a full answer, exactly because I know you! :) –  Mandx Oct 27 '11 at 15:54
Seeing that the problem is narrowed down to insufficient memory, set the RAM usage to the half of the system for a start. I don't know about Java, but could it be a system/global memory option overriding yours? –  Mandx Oct 27 '11 at 15:57
that's what I don't get. The system has 1Gb and as you can see I have set 128Mb for JAVA –  Julio Menendez Oct 28 '11 at 9:48

Your issue here is ant needs to start a new system process to run javac. Unfortunately, you're out of memory to start the new process. Modifying the -Xmx128m parameters and the like will only give more or less memory to the ant process, rather than the new javac process.

My suggestion is to increase the swap space on your box. This should allow you to create more processes.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.