Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ANT Script throws Out of Memory: PremGen space

 
sasank ch
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am running the ANT script at Command prompt C:\Application>, which can build around 30 applications in single shot.
So, before running the script I have set the PremGen space as follows:

C:\Application>set JAVA_OPTS="-Xms128m -Xmx1024m -XX:MaxPermSize=1024m"
C:\Application>ant buildMainApplication.


But, middle of ant build, it is giving us Out of Memory: PremGen space.

Could any body please help me to resolve this issue.

Regards,
Srinivas
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm, is your name Srinivas or Sanak? http://www.javaranch.com/name.jsp

Anyway, the ant script (I'm looking at Ant 1.7.1) does not make use of JAVA_OPTS. Try setting ANT_OPTS instead.
 
sasank ch
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I have increased upto 256M and unable to increase more than that. it gives the following error:
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

Could you please let me know, is there any way to clear VM space, while we are running continuous builds.

Please help us to resolve the above issue.

Regards,
Sasank
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic