Community
Participate
Working Groups
I am trying to compile my project using AspectJ compiler v1.1.1. My Project has nearly 1000 java files. But everytime I compile, I get "java.lang.OutOfMemoryError". I have tries compiling my project in parts also, but it gives the same error, while compiling 200 files together. I can not afford to compile less than these files at a time, as these are in different packages also. Exact compiler options I am giving is.... C:\jdk1.4.2_04\bin\java -cp C:\progra~1\JBuilder9 \lib\ext\aspectjrt.jar;C:\progra~1 \JBuilder9lib\ext\aspectjtools.jar;D:\Temp\RecordsManager\lib-extract\ALL org.aspectj.tools.ajc.Main -g -d "D:\~Working\FileNet\RecordsManager\WEB- INF\classes" -sourceroots "com\filenet\wcm;com\filenet\rm;com\filenet\portal" 1>compile_log.txt 2>&1 And exact text of error is..... java.lang.OutOfMemoryError D:\~Working\FileNet\RecordsManager\Source\com\filenet\wcm\apps\server\ui\WcmPlug InModule.java:0 Internal compiler error java.lang.OutOfMemoryError !! no source information available !! ABORT Exception thrown from AspectJ 1.1.1 Please look into this asap. I get the same error, If I try to compile the same code from JBuilder (with AspectJ plugin). Regards, Praveen
Two things spring to mind. First, from the list of compiler options, you don't seem to be specifying a large heap setting? The default for the JVM is 64M I think, which isn't very much at all. Can you try by specifying '-Xmx256M' or '-Xmx512M' to supply more memory? Second, 1.1.1 is an old version of AspectJ - 1.2.1 is now out and improves memory usage and compile/weave times - can you switch to this new version? let me know what happens.
The problem has been resolved by using '-Xmx256M' option in compiler options. But this option is not accepted by AspectJ plugin in Jbuilder. I guess, this is not the right place to discuss about that plugin. Anyway I am able to compile now through command prompt after increasing heap size. Thanks, Praveen
For JBuilder, add the following line to your <jbuilder>/bin/jbuilder.config file: vmparam -Xmx256m Or more if you find it still running out.