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

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -