JDK-6814090 : RFE: implement -XX:OnOutOfMemoryError for JRE 5.0
  • Type: Enhancement
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris
  • CPU: sparc
  • Submitted: 2009-03-06
  • Updated: 2010-07-29
  • Resolved: 2009-03-06
Related Reports
Duplicate :  
Description
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.
%