0 Replies Latest reply on Dec 16, 2009 1:04 PM by cdman522

    Java heap error when using compc

    cdman522

      I have a large project, 100's of source files that I'm trying to compile into a swc. In Flash Builder 4 it works fine. When I try to do it in compc I get a Java heap space error. I've scoured google for help and haven't found anything useful. Does anyone on here know much about ant or compc? What am I doing wrong?

      Here's the code that I use to compile. It gets all the files for me so I don't have to type them in one at a time. That part seems to work, it's when it calls compc that ant hangs for about 30 seconds then quits with a Java heap space error.

       

                <target name="-resolve-shared-classes">
                <path id="list_1">
                     <fileset dir="${basedir}\${shared.source}\">
                          <include name="com\**" />                    
                          <include name="edu\**" />
                     </fileset>
                </path>
                <pathconvert property="project_classes_property" pathsep=" " dirsep="." refid="list_1">
                     <map from="${basedir}\${shared.source}" to="" />
                     <mapper>
                          <chainedmapper>
                               <globmapper from="*.as" to="*" />                         
                          </chainedmapper>
                          <chainedmapper>
                               <globmapper from="*.mxml" to="*" />                         
                          </chainedmapper>
                     </mapper>
                </pathconvert>
                <echo>${project_classes_property}</echo>
           </target>
           
           <target name="compileShared" depends="-resolve-shared-classes">
                <compc fork="true" output="${basedir}\${shared.bin}${shared.name}.swc" 
                     include-classes="${project_classes_property}">               
                     <load-config filename="${basedir}\${shared.source}sharedConfig"/>     
                     <source-path path-element="${basedir}\${shared.source}"/>                                   
                </compc>
           </target>