When this exception occurs, it means java runs out of memory.

You can increase memory(heap size) by run java including these parameters

-Xms[initial heap size] -Xmx[maximum heap size]

For example, set initial heap size to 128m and maximum to 256m.

java -Xms128m -Xmx256m

In NetBeans, simply goes to Project Properties –> Run.
Then you can add these parameters in VM Options.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • description
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • Fark
  • Fleck
  • Furl
  • Reddit
  • Slashdot
  • SphereIt
  • StumbleUpon
  • Technorati
  • Blue Dot
  • description
  • MyShare
  • Spurl
  • YahooMyWeb

Related post