This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Increase JVM heap size of eclipse

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can anyone please tell me on how i can increase the heap size of eclipse?when running a program i am getting the error as follows:

Loading...
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space



Thank you in advance!!
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the -Xmx command line switch. Specifically for Eclipse, do this:

eclipse.exe -vmargs -Xmx512M

This gives Eclipse a maximum of 512 MB memory.

Note: I am assuming you want to give the Eclipse IDE itself more memory. If this isn't an issue with the IDE itself but with your own program which you are launching from the IDE, then you'll need to do something different: Select Run / Open Run Dialog, then select the configuration for launching your application. Click the Arguments tab, and in the box "VM arguments" add something like "-Xmx256M" to give your application 256 MB of memory.
 
You would be much easier to understand if you took that bucket off of your head. And that goes for the tiny ad too!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!