Hi all.
Java get an errors when i can read 10-20 images (about 7mb at all).
this code:
This exceptions:
----------------------------------------------------
Exception in
thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap space
at java.awt.image.DataBufferInt.<init>(Unknown Source)
at java.awt.image.Raster.createPackedRaster(Unknown Source)
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)
at sun.awt.image.ImageRepresentation.createBufferedImage(Unknown Source)
at sun.awt.image.ImageRepresentation.setPixels(Unknown Source)
at sun.awt.image.ImageDecoder.setPixels(Unknown Source)
at sun.awt.image.JPEGImageDecoder.sendPixels(Unknown Source)
at sun.awt.image.JPEGImageDecoder.readImage(Native Method)
at sun.awt.image.JPEGImageDecoder.produceImage(Unknown Source)
at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
at sun.awt.image.ImageFetcher.run(Unknown Source)
Exception in thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap space
at java.awt.image.DataBufferInt.<init>(Unknown Source)
at java.awt.image.Raster.createPackedRaster(Unknown Source)
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)
at sun.awt.image.ImageRepresentation.createBufferedImage(Unknown Source)
at sun.awt.image.ImageRepresentation.setPixels(Unknown Source)
at sun.awt.image.ImageDecoder.setPixels(Unknown Source)
at sun.awt.image.JPEGImageDecoder.sendPixels(Unknown Source)
at sun.awt.image.JPEGImageDecoder.readImage(Native Method)
at sun.awt.image.JPEGImageDecoder.produceImage(Unknown Source)
at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
at sun.awt.image.ImageFetcher.run(Unknown Source)
Exception in thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap space
at java.awt.image.DataBufferInt.<init>(Unknown Source)
at java.awt.image.Raster.createPackedRaster(Unknown Source)
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)
at sun.awt.image.ImageRepresentation.createBufferedImage(Unknown Source)
at sun.awt.image.ImageRepresentation.setPixels(Unknown Source)
at sun.awt.image.ImageDecoder.setPixels(Unknown Source)
at sun.awt.image.JPEGImageDecoder.sendPixels(Unknown Source)
at sun.awt.image.JPEGImageDecoder.readImage(Native Method)
at sun.awt.image.JPEGImageDecoder.produceImage(Unknown Source)
at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
at sun.awt.image.ImageFetcher.run(Unknown Source)
Exception in thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap space
at java.awt.image.DataBufferInt.<init>(Unknown Source)
at java.awt.image.Raster.createPackedRaster(Unknown Source)
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)
at sun.awt.image.ImageRepresentation.createBufferedImage(Unknown Source)
at sun.awt.image.ImageRepresentation.setPixels(Unknown Source)
at sun.awt.image.ImageDecoder.setPixels(Unknown Source)
at sun.awt.image.JPEGImageDecoder.sendPixels(Unknown Source)
at sun.awt.image.JPEGImageDecoder.readImage(Native Method)
at sun.awt.image.JPEGImageDecoder.produceImage(Unknown Source)
at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
at sun.awt.image.ImageFetcher.run(Unknown Source)
Exception in thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap space
Exception in thread "Thread-18" java.lang.OutOfMemoryError: Java heap space
Exception in thread "Thread-16" java.lang.OutOfMemoryError: Java heap space