Build Failed java.lang.OutOfMemoryError: Java heap space

后端 未结 4 2082
情深已故
情深已故 2021-01-31 09:21

I am facing this issue while building my build.xml.

BUILD FAILED
java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Arrays.java:2786)
            


        
4条回答
  •  [愿得一人]
    2021-01-31 10:21

    If 'javac' task is used with fork option then , javac will run in his own process and memory should be directly assigned to the javac using 'memoryinitialsize' and 'memorymaximumsize':

    javac   srcdir="${src}"
                destdir="${classes}"
                source="1.6"
                debug="true"
                fork="true"
                deprecation="off"
                memoryinitialsize="512m"
                memorymaximumsize="1024m"
    

提交回复
热议问题