Create jsp to generate Out Of Memory -


i want create war application generate out of memory in application server. see code. how can compile in jsp in war? thanks

import java.util.arraylist;  class testoome {      public static void main(string[] args) {         long start = system.currenttimemillis();         byte[] buffer = new byte[2^20];         arraylist<string> list = new arraylist<string>();         try {             while (true) {                 list.add("lollygobblenlissbomb");             }         } catch (throwable t) {             long end = system.currenttimemillis();             buffer = null;             system.err.println(t + " in " + (end-start) + " millis.");         }     } } 


Comments

Popular posts from this blog

java - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -