aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes ANT Script throws Out of Memory: PremGen space Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "ANT Script throws Out of Memory: PremGen space" Watch "ANT Script throws Out of Memory: PremGen space" New topic
Author

ANT Script throws Out of Memory: PremGen space

sasank ch
Greenhorn

Joined: Nov 07, 2007
Posts: 25
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

Joined: May 14, 2008
Posts: 5772
    
    7

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.


JBoss In Action
sasank ch
Greenhorn

Joined: Nov 07, 2007
Posts: 25
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ANT Script throws Out of Memory: PremGen space
 
Similar Threads
Getting directory name from ant
MultiDimenaional Array sort
Config files in a classpath ?
JVM crash due to perm gen space 99% in use
Unable to parse setupCmdLine: null\bin\setupCmdLine.bat