Skip to content
Advertisement

Java1.5 ExitOnOutOfMemory?

I am having a problem making my java instance recognize command line CrashOnOutOfMemoryError or ExitOnOutOfMemoryError

any ideas to get the supported command line that will do the required feature

Regards,

Advertisement

Answer

Unless you’re using Java 1.8 (specifically, 1.8u92 or newer), these command-line options are unavailable to you.

The only realistic thing one could do would be to catch either an OutOfMemoryError and call System.exit(1), but that would be considerably less desirable.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement