]"AWT-EventQueue-0" java.lang.OutOfMemoryError: Java Heap Space
I am writing an java application where I can drag and drop images. But what happen, while handling if it is more than 3 mb size image. It is giving an error
"AWT-EventQueue-0" java.lang.OutOfMemoryError: Java Heap Space
but try to increase the heap size also. Still I am getting the same error.
any solutions.
Ok, now it is working for 3mb
But my clients they are telling, they have 25+ mb size one image file. Whether it will work. What is problem means I can make batch file
which contain like this(<filename>.bat):
java -Xmx256m <filename>
But what is problem means they may use this application(JAR) in Windows or Linux or MAC
Then how can I make it for JAR file.
> But my clients they are telling, they have 25+ mb
> size one image file. Whether it will work. What is
> problem means I can make batch file
You should be able to know if it works, only after testing it out with a sample 25MB image file. You could also explore into possibilities for optimization. There is a smartass around who should guide you with that.
I have got the idea how we can increase the heap size in JAR file.
I have got the idea how we can increase the heap size in JAR file.
I have got the idea how we can increase the heap size in JAR file.
So we won't get this error
java.lang.OutOfMemoryError: Java Heap Space