Ant compilation project resources are insufficient

Source: Internet
Author: User
Today, there are insufficient [javac] system resources for compiling projects with ant. As follows:

Buildfile: Build. xml

-Compile:
[Javac] compiling 919 source files to E: \ dshr \ webcontent \ WEB-INF \ Classes
[Javac]
[Javac]
[Javac] insufficient system resources.
[Javac] For details, see the following stack tracing.
[Javac] java. Lang. outofmemoryerror: Java heap Space

It seems that the memory is insufficient. Set it to a larger value.






the following error occurs during compilation
buildfile: build. XML

-compile:
[javac] compiling 919 source files to E: \ dshr \ webcontent \ WEB-INF \ Classes
[javac] Since fork is false, ignoring memorymaximumsize setting.
[javac]
[javac]
[javac] insufficient system resources.
[javac] For details, refer to the following stack tracing.
[javac] java. Lang. outofmemoryerror: Java heap space

Since fork is false, ignoring memorymaximumsize setting. This statement should be because fork is false, so the configured memorymaxmumsize will be ignored and the modification will continue.
<Target name = "-compile">
<Javac srcdir = "$ {srcdir}" destdir = "$ {builddir}" fork = "true" memorymaximumsize = "500 m" includes = "**/*. java "classpathref =" class_path ">
<Compilerarg value = "-xlint: unchecked"/>
</Javac>
</Target>
Use ant to compile and pass.

Note: In the ant document (% ant_home %/docs/manual/index.html by default), you can view ant tasks to list many tasks. javac is in compile tasks.
Click javac to view more parameter information.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.