Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3214598
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:04:47+00:00 2026-05-17T15:04:47+00:00

When creating an ant build script to generate Javadoc, Eclipse is receiving an OutOfMemoryError.

  • 0

When creating an ant build script to generate Javadoc, Eclipse is receiving an OutOfMemoryError.
The ant build has the -Xmx512m and -Xms512m settings under the JRE tab in the run configuration.
This works great for compiling the application.
The only trouble is with the Javadoc portion of the build. Here is the build.xml file

<target name="JavaDoc" description="Create Javadocs">
    <javadoc destdir="c:/javadoc" windowtitle="My API">
        <classpath refid="application.classpath" />
        <packageset dir="Source">
            <include name="**" />
        </packageset>
    </javadoc>
</target>

When the build script runs I see a 2 step process,
Eclipse launches

org.eclipse.ant.internal.ui.antsupport.InternalAntRunner

Visual VM shows that this process launches with the Heap memory arguments listed above.
This process then spawns the 2nd process "JavaDoc" and the VM arguments are not passed along with it.
In VisualVM it can be confirmed that the JavaDoc process has a default -Xms8m value and around a 64m Xmx value before the OOM error is thrown.

Under the Ant preferences in Eclipse I have attempted to add an ‘ANT_OPTS’ variable to pass the JVM args to JavaDoc.
The change did not work.

The build does work if I create a batch file and set the ANT_OPTS values.

set ANT_OPTS=-Xms512m -Xmx512m
ant -file C:\myApp\build.xml JavaDoc

But creating the batch file is defeating the purpose of allowing me to build everything directly in Eclipse.

I have also tried adding an to the build file, which would hardcode a heap size

<arg value="ANT_OPTS=-Xms512m -Xmx512m" />

Any idea how to set the value so my javadoc will spawn with more heap size?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:04:48+00:00Added an answer on May 17, 2026 at 3:04 pm

    The javadoc task has the attribute maxmemory for specifying this. Allows you to separately tune for this task.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hallo, I cannot compile my project using an ant build script. The error message:
I'm working on a project that uses NetBeans to generate the ANT build files.
The limitation I'm referring to is documented here . Essentially, in my build script
Creating a patch is very easy in SubVersion, With Tortoise, you right-click and select
Creating hashes of hashes in Ruby allows for convenient two (or more) dimensional lookups.
Creating Traversals for Binary Search Tree with Recursion. void inOrder(void (*inOrderPtr)(T&)) { if(this->left !=
Creating an XPathDocument with referenced DTD sometimes throws a web exception. Why?
When creating a web application, and lets say you have a User object denoting
While creating a file synchronization program in C# I tried to make a method
When creating a criteria in NHibernate I can use Restriction.In() or Restriction.InG() What is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.