RE: java.lang.OutOfMemoryError: Java heap space while compile

28336, modified 19 Years ago. New Member Posts: 4 Join Date: 11/10/06 Recent Posts
Hello,
I try to compile LR 4.2.0 via ANT on Eclipse.
I followed the instruction at this page http://content.liferay.com/4.0.0/docs/quickstart/ch04s01.html
But when I want to do this : ant clean start build-ext I got this error on ANT console, after launching "start"


build-common-java.compile:
    [javac] Compiling 1695 source files to D:\workspace\projetLR\liferay\portal\portal-ejb\classes
    [javac] Since fork is false, ignoring memoryMaximumSize setting.
    [javac] The system is out of resources.
    [javac] Consult the following stack trace for details.
    [javac] java.lang.OutOfMemoryError: Java heap space

BUILD FAILED
D:\workspace\projetLR\liferay\portal\build.xml:15: The following error occurred while executing this line:
D:\workspace\projetLR\liferay\portal\build.xml:171: The following error occurred while executing this line:
D:\workspace\projetLR\liferay\portal\portal-ejb\build.xml:11: The following error occurred while executing this line:
D:\workspace\projetLR\liferay\portal\build-common-java.xml:28: Compile failed; see the compiler error output for details.



thanks for help.
Jerome.
28336, modified 19 Years ago. New Member Posts: 4 Join Date: 11/10/06 Recent Posts
any answers?
thumbnail
11291, modified 19 Years ago. Expert Posts: 451 Join Date: 6/21/06 Recent Posts
28336, modified 19 Years ago. New Member Posts: 4 Join Date: 11/10/06 Recent Posts
Jerry Niu:
Check out this posting and see if it helps.
http://www.liferay.com/web/guest/community/forums/message_boards/message/94308


Thanks. But I've already take some time on different posts on the forum and on the LEP. But I could not find the same problem.

I've tried to :
- configure my JVM parameters (maximum memory : 512Mo)
- to launch 2 "start" (ant clean start start build-ext)

but none could resolve my problem.
28336, modified 19 Years ago. New Member Posts: 4 Join Date: 11/10/06 Recent Posts
Hello,
I still have no answer on my problem.
May be it is because I use javac instead of jikes? or is it my machine that is not enough strong?
29666, modified 19 Years ago. New Member Posts: 2 Join Date: 2/11/07 Recent Posts
I was getting errors when using the jikes compiler. So I switched to Sun's compiler and was successful, though it took a while to compile. I changed the following in build.properties:

javac.compiler=modern
javac.fork=true

Without the fork=true I too got the OutOfMemoryError.
461579, modified 18 Years ago. New Member Posts: 7 Join Date: 2/7/08 Recent Posts
Hi There,
I am facing issue in compilation. I have changed to javac.compiler=modern in build. Properties file I am using Liferay Source code 4.4.1 Please let me know.
I have searched the forum for the same and unable to mark it properly

[javac] The system is out of resources.
[javac] Consult the following stack trace for details.
[javac] java.lang.OutOfMemoryError: Java heap space

BUILD FAILED


Thank You!
thumbnail
282548, modified 18 Years ago. Expert Posts: 491 Join Date: 11/19/07 Recent Posts
This may be a repetitive question for you, but, have you set your ANT_OPTS system variable? Follow the directions on this wiki article if you haven't, and that should solve your out of memory compiling problems:
http://wiki.liferay.com/index.php/Ant_opts
jr