Setting Eclipse and Java application JVM heap size on Mac OS X

The other day I kept on getting annoying “out of heap space” errors in Eclipse while running a memory intensive Java application I had written and it took a bit of searching to find the answer, so I thought I’d make a quick screencast that demonstrates how to increase the heap size of the JVM that Eclipse uses as well as how to increase the heap size allocated to your Java applications by Eclipse.

screecast thumbnail

This screencast is also available in podcast format for video iPods.

subscribe with itunes



34 Responses to “ “Setting Eclipse and Java application JVM heap size on Mac OS X”

  1. Patrick says:

    Hi Brooks,

    which software did you use to record your screen under MacOSX?

    Thanks in advance

  2. luke says:

    this really helped me out. thanks very much.

  3. Olga says:

    Thank you! This was great help!

  4. caren says:

    that was total awesome and really helped me out! thank you!

  5. gzur says:

    Kick ass screencast. Encapsulated my problem to the letter.
    Great job.

  6. Hentai Blog says:

    And, by the way, what software did you use to record your screen?

  7. DLO says:

    Excellent! Thank you!! I’ve just bookmarked your blog site now.

  8. Brooks says:

    I actually used Jing to record this screencast and After Effects to add the perspective and effects.

  9. Kevin says:

    Bravo! This solved my problem. Keep up the screencasts!

  10. john says:

    thanks so much, couldn’t find it as hard as i look.
    very interesting recording style, i kinda like it

  11. David K says:

    Thank you very much, this helped me quite a bit

  12. Jason says:

    Thank you so much! This problem has been plaguing me all year as I’m often loading very large corpora, and everyone I’ve asked about this has directed me to the eclipse.ini file…very frustrating! Had I just found this first I could have saved myself 80+ hours of workarounds and aimless searching…

  13. ye says:

    Thanks a lot, buddy! It really helps!!

  14. burnt says:

    THANX! GREAT HELP!

  15. Nice screencast, ive really had some problems, and all the answers i could find ony set the max and min for the jvm from where eclipse ran!
    Thanks a bunch!

  16. Sumiran Pradhan says:

    Thanx man!!Helped me out a lot!!

  17. David Jameson says:

    I couldn’t get your screencast to play (on my Mac under Firefox) — I wish you had posted a textual explanation of what to do!

  18. Elham says:

    Dear Brooks,
    This was awesome. You are crystal clear about the process and this is a helpful movie. My problem is the VM argument in my eclipse is not active. It is empty and I can not change it.
    Any idea?

    Thanks

  19. observer says:

    Thank you so much!

  20. pvremort says:

    Thanks ! Finally a good and clear solution to the memory spaghetti in Eclipse.

  21. Troy says:

    Awesome vid! This was just what I was looking for.

  22. Jawad ashraf says:

    Dear Brooks
    I dont usually comment in forums, but the solution I was looking for many days is only given by you, not even on very technical sites. I couldnt stop myself to comment on it.
    Hats off for you.

    Thanks

  23. Adam B says:

    Thanks a lot. this really helped. I’m kind of a newb when it comes to java, Do you know how it works if i send this as a .jar to a friend, will he have to up his heap size too? or will the JVM do that for him automatically for .jars?

  24. Gary S says:

    AWESOME!!! Exactly the information I needed. Can’t thank you enough.

  25. Basim says:

    Thanks a million!

  26. tona says:

    Wow!!! I’ve been looking for this for a WHILE… thanks! everybody tells you to increase it on the eclipse.ini, but that didn’t help… thanks for explaining where to increase it to directly affect the program.

  27. John T. Vonachen says:

    cudos

  28. koorosh says:

    Thanks man, you solved my problem!. It is very interesting, you posted this in 2006, its now 2011 and you are still receiving kudos for it :D

  29. dfunkt says:

    much thanks, very helpful!

    however, i agree with David Jameson that it would be awesome if you also had a text summary…sometimes i forget my headphones, and playing videos in a very confined cube zone at work is annoying for everyone.

  30. zauhar says:

    Late to the party, but wanted to thank you for this great screencast. For whatever reason, the ‘vmargs’ box in run configuration was not registering, and I was trying to set the heap size on the eclipse command line…..

  31. Mike says:

    thanks!

  32. Soundar says:

    Thanks a lot.

  33. zbenta says:

    Thanks a lot for this tip, you’ve just saved my day.

Leave a Reply