title: Scanner program OutOfMemoryError & Java Heap dump analysis using Memory analyzer (MAT
body: <p>I am trying to analyze a heap dump of my Java applet which runs out of heapspace even if i increase the heap size as shown in this post. <a href="https://stackoverflow.com/questions/5026376/applet-java-heap-space">Applet: Java heap space</a></p>
  
  <p>Now i took some heap dumps today morning (yes..its possible to take digital dumps) and im trying to analyze them with MAT and Visual VM 1.3.5. After running the leak test, the key suspects were org.eclipse.jdt.internal.core.JavaModelManager and org.eclipse.jst.jee.archive.internal.ArchiveImpl.. I HAVENT USED ANY OF THESE IN MY CODE.</p>
  
  <p>Visual Vm shows that the highest space is taken by Byte[], Int[], Char[], java.lang.string and short[] classes. I am not using too many of these in my program. How should i understand this dump and what should be my next steps? I can post a copy of the dump if needed.</p>
  
  <p>Update: MAT is better than visual VM in my case here. I have been taking dumps (again.. digital dumps) and analyzing them with both tools since morning. While VVM shows org.eclipse.jdt.internal.core.JavaModelManager and org.eclipse.jst.jee.archive.internal.ArchiveImpl as the suspects in its leak suspect reports, Eclipse memory analuzer (MAT) shows that my swing application is making thumbnails of images in a folder (each image is about 100kb) and showing them as a JToggleButton. But once the thumbnails are added, the JtoggleButton size is 6MB.. hence if there are a 100 images in a folder, the thumbnails of the images will be 600MB atleast. and besides that, i need to do other stuff with this program.. MAT helped in this case to identify the exact objects that took most heap space.</p>
  
  <p>Thanks
  DJ.</p>