java.lang.OutOfMemoryError: Java heap space

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nikhat Khan
    New Member
    • Mar 2011
    • 2

    java.lang.OutOfMemoryError: Java heap space

    Hi,
    I am new to this forum.

    I just finished making an image processing tool for my college project by manipulating the image pixels.
    Small size images up to 600-700 kb are loaded properly, but when when I try to load an image with size greater than 1 Mb it gives error.

    Exception in thread "AWT-EventQueue-0" java.lang.OutOf MemoryError: Java heap space
    at GetImage.getIma gePixels(GetIma ge.java:109)
    at GetImage.loadIm age(GetImage.ja va:86)
    at First$2.actionP erformed(First. java:120)

    I tried increasing the heap size of jvm but still the same error.
    Please help.
    Thanks
  • Dheeraj Joshi
    Recognized Expert Top Contributor
    • Jul 2009
    • 1129

    #2
    Whats is the image size and what is the heap memory set to?

    Regards
    Dheeraj Joshi

    Comment

    • Nikhat Khan
      New Member
      • Mar 2011
      • 2

      #3
      Thanks a lot Dheeraj for replying

      This is the current Heap size:

      XX:MaxPermSize= 128m
      -Xms128m
      -Xmx1024m

      Images less than 800 kb are processed properly.When i try to load images greater than this size, it gives heap size error.

      Please reply asap.
      Thanks

      Comment

      Working...