• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Solution needed for OutOfMemoryError: Java heap space

 
Ranch Hand
Posts: 387
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working in Eclipse on a java program that I inherited and I am getting the following error when I'm trying to import an .XML file that is 57MB in size:



My question: is there a way to increase the memory for this program to run by manipulating the VM arguments in Eclipse? I was thinking of putting the following in the VM arguments section of the Debug Configurations? I was thinking about inserting this into the VM arguments: "java -Xmx1024M" . I do have Program arguments as well.

Any help and/or direction would be greatly appreciated. Thanks.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why not just try it?
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How are you running the Java app? If in the same JVM as Eclipse, then making the eclipse.ini changes should work. If in a separate JVM, then you will have to provide the JVM options as part of the run configuration (VM Arguments list box on the Arguments tab).
 
Melinda Savoy
Ranch Hand
Posts: 387
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Peter -- thanks. I finally got it running.

David -- Sorry, I should have mentioned that I had tried running it and kept getting an error. I just did not know if I put in the memory allocation setting in the VM Arguments or not and was looking for some help.

Thanks guys. I appreciate the time and help. Regards.
 
For my next trick, I'll need the help of a tiny ad ...
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic