Quantcast
Channel: Am I Autodidact?
Viewing all articles
Browse latest Browse all 25

Getting rid of java.lang.OutOfMemoryError

$
0
0
Most JVMs allocate memory on the heap for almost everything, except for reflective data. That is put in a separate location which is a section of the heap that is reserved for permanent generation. This gets easily filled up when you dynamically load an unload classes, or have a large number of classes. Simply add the following options to the java executable and all worries will be gone:
-XX:PermSize=256M -XX:MaxPermSize=256M
The entire command looks like this:
java -server -Djava.awt.headless=true -Xms1024M -Xmx1024M -XX:PermSize=256M -XX:MaxPermSize=256M
Read This

Viewing all articles
Browse latest Browse all 25

Trending Articles