javaantjavac

javac default memoryInitialSize and memoryMaximumSize?


What are the default values for javac parameters memoryInitialSize and memoryMaximumSize? Does it take these values from an env/os property or setting?

<javac 
  srcdir="@{srcdir}" 
  destdir="@{destdir}"
  includeantruntime="@{includeantruntime}"
  debug="@{debug}" 
  deprecation="@{deprecation}" 
  target="@{target}"
  source="@{target}"
  fork="@{fork}" 
  executable="@{executable}"
  memoryInitialSize="@{memoryInitialSize}"
  memoryMaximumSize="@{memoryMaximumSize}">
  <compilerarg compiler="${build.compiler}" line="${build.compiler.args}"/>
  <javac-elements/>
</javac>

Solution

  • The documentation says, that ant uses the standard VM memory settings if javac runs externally. As dkatzel points out in his comment, those VM setting are discussed here.