An OOME is of the class of errors which generally you shouldn\'t recover from. But if it is buried in a thread, or someone catches it, it is possible for an application to g
edit OutOfMemoryError.java, add
System.exit() in its constructors.
compile it. (interestingly javac
doesn't care it's in package java.lang)
add the class into JRE rt.jar
now jvm will use this new class. (evil laughs)
This is a possibility you might want to be aware of. Whether it's a good idea, or even legal, is another question.