This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Issue : [javac] java.lang.OutOfMemoryError: Java heap space Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Issue : [javac] java.lang.OutOfMemoryError: Java heap space" Watch "Issue : [javac] java.lang.OutOfMemoryError: Java heap space" New topic
Author

Issue : [javac] java.lang.OutOfMemoryError: Java heap space

pandithurai shanmugam
Greenhorn

Joined: Dec 16, 2009
Posts: 1
Hi

I am facing this issue when I try to compile a package (which have more java files)

[javac] java.lang.OutOfMemoryError: Java heap space

I have tried various options like
1) set ANT_OPTS=-Xms512m -Xmx512m in the build environment.

2) set fork attribute = TRUE in the build.xml

Nothing is working for me. I have searched through some forums and got above resolutions. Even I increased ANT_OPTS values up to -Xms1024m -Xmx512m. Still I didn't get resolved this issue.

I am using ANT1.6.1 and JDK150.

If any one give suggestion on this, that would help me a lot.

Thanks in advance,
Pandithurai.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

In the 1G one you have -Xms and -Mmx reversed; mx is the max.

Try increasing the PermGen space? How many classes are there?! It might be helpful to include the entire stack trace/build output to help pinpoint what's going wrong, and during what--I mean, I'm compiling a half-million line project without having to increase the memory settings, so something's probably configured wrong.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Issue : [javac] java.lang.OutOfMemoryError: Java heap space
 
Similar Threads
java.lang.OutOfMemoryError
"Timer-10" java.lang.OutOfMemoryError: Java heap space
startNodeManager.sh and startWeblogic.sh doesn't start to execute
How Do I Find a Memory Leak?
OutOfMemory Exception while building using eclipse compiler