Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Uncaught exception: OutofMemoryError (Need Help)

 
Kobe Phenom
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to create a load a property file with the following stmt:
try {
resourceBundle = model.getResourceBundle(BASE_NAME_UI_RESOURCES);
}catch (ApplicationException e) {
System.err.println("Exception: " + e);
}

However, there is "Uncaught exception java/lang/OutOfMemoryError" when itry to run the program.
Can anyone help me figure out my problem? or perhaps give me an example on how to load a property file? tnx in advance.
 
James Reilly
wrangler
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An OutOfMemoryError is thrown when when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector.
You might check how much heap memory the device you are using has,
how your application consumes heap memory and why/when, and modifying
it's design appropriately if possible. For example, don't keep lots of
large bitmap images open at the same time unless they are all needed.
Free old MIDlet screens that are no longer needed, etc.
hope this helps,
jim
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic