Please implement flag -XX:OnOutOfMemoryError=<cmd> for JRE 5.0.
1. JRE 1.4.2
------------
1.1 option is not recognized in 1.4.2_11
----------------------------------------
% /j2sdk1.4.2_11/bin/java -XX:OnOutOfMemoryError="echo hello"
Unrecognized VM option 'OnOutOfMemoryError=echo hello'
Could not create the Java virtual machine.
%
1.2 option is recognized in 1.4.2_12
------------------------------------
% /j2sdk1.4.2_12/bin/java -XX:OnOutOfMemoryError="echo hello"
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
[ ... ]
2. JRE 5.0
----------
option is not recognized in 1.5.0_17
% /jdk1.5.0_17/bin/java -XX:OnOutOfMemoryError="echo hello"
Unrecognized VM option 'OnOutOfMemoryError=echo hello'
Could not create the Java virtual machine.
%
1. JRE 1.4.2
------------
1.1 option is not recognized in 1.4.2_11
----------------------------------------
% /j2sdk1.4.2_11/bin/java -XX:OnOutOfMemoryError="echo hello"
Unrecognized VM option 'OnOutOfMemoryError=echo hello'
Could not create the Java virtual machine.
%
1.2 option is recognized in 1.4.2_12
------------------------------------
% /j2sdk1.4.2_12/bin/java -XX:OnOutOfMemoryError="echo hello"
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
[ ... ]
2. JRE 5.0
----------
option is not recognized in 1.5.0_17
% /jdk1.5.0_17/bin/java -XX:OnOutOfMemoryError="echo hello"
Unrecognized VM option 'OnOutOfMemoryError=echo hello'
Could not create the Java virtual machine.
%
- duplicates
-
JDK-6173515 Improve handling of OutOfMemoryError
- Resolved