• Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting Exception "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space  RSS feed

 
Ramu Ramaiah
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to write a simple editor. Please see below for the code. When I try to open a big file of size more than 1 MB, I am getting the above exception.



Can somebody help me figure out, is there any alternate technique to avoid this kind or problem?

Thanks,
Ramu
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So use more memory! The -XmxNNm command line switch, where NN is the desired number of megabytes for the Java heap, will do it. The default is usually 64, so try 128 or 256.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!