javac compiler throwing error in CentOS 5.7

Posted by Julio Menendez on Server Fault See other posts from Server Fault or by Julio Menendez
Published on 2011-10-26T21:16:28Z Indexed on 2012/11/05 23:04 UTC
Read the original article Hit count: 336

Filed under:
|
|

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:

BUILD FAILED
/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-1.6.0.0.x86_64/bin/javac 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: java.io.IOException: Cannot run program "/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/bin/javac": java.io.IOException: error=12, Cannot allocate memory
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
    at java.lang.Runtime.exec(Runtime.java:610)
    at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:862)
    at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:481)
    at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:495)
    at org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.java:522)
    ... 32 more
Caused by: java.io.IOException: java.io.IOException: error=12, Cannot allocate memory
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
    at java.lang.ProcessImpl.start(ProcessImpl.java:81)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:468)
    ... 37 more

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

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

Thanks!

© Server Fault or respective owner

Related posts about centos

Related posts about java