我想创建战争应用程序以在应用程序服务器中生成内存不足。我看到了这段代码。如何在战争中编译jsp?谢谢
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.");
}
}
}