I am looking for a code which will deliberately crash my Tomcat Server.
EDIT (moved from comments)
I did this but it still doesnot crash
ArrayList list = new ArrayList();
for (int i = 0; i < Integer.MAX_VALUE; i++)
{ list.add(new Object()); }
I have tried static Lists, HashMaps but I am still not able to cause java.lang.OutOfMemoryError: Java heap space
Thanks