Skip to Content
Author's profile photo Markus Kohler

The amazing new heap dump feature in JDK 1.4.2_12

In Welcome to my new Netweaver performance blog I talked briefly about the new heap dump feature in
JDK 1.4.2_12 (should also be available in the last JDK 1.5 release, but I have not yet checked this).
First a disclaimer,
I’ve not yet seen
an official support statement from Sun for this feature. So
use it at your own risk !

Today I will

give you more information about how to use it with a Netweaver 04(s)

application server. As I mentioned before there is not only an option

to trigger a heap dump on an out of memory situation (-XX:HeapDumpOnOutOfMemoryError)

 +but also one to trigger a dump manually. The option

is  -XX:+HeapDumpOnCtrlBreak and allows you to trigger a heap

dump using the CtrlBreak key combination. This is useful for triggering

a heap dump of any java application that is running in a console

windows (at least on windows), but it also means that you can trigger a

heap dump easily from your SAP Management Console using the thread dump

menu :

This works, because essentially a

thread dump is triggered by the same signal as the heap dump and as

soon as you have configured 

 -XX:+HeapDumpOnCtrlBreak you will just get a thread and a heap dump.

Heap dumps are written by default in the application’s working

directory The easiest way to get Jhat is to goto

and download the JDK 1.6 beta.


More information about jhat can be found on Suns JDK 1.6 web site.

aware that for  large heap dumps of several hundred Mbytes,jhat will need lot’s of memory. I’m speaking
about  Gigabytes, so you will need a 64 bit machine
and operating system. 
There’s at least one

commercial profiler (

that also supports reading in this .hprof files. It requires less

memory and has more features than jhat.



Update: Check Olivers blog about the new SAP VM features  at The SAP Java VM – What’s in it for me?.

I can add that the SAP VM also supports the new heap dump feature.

One more update:

HP now also supports the new heap dump feature starting with JDK 1.4.2_11 and JDK 5.0.05.

Get it from here

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Dagfinn Parnas
      Dagfinn Parnas
      On time that SUN JVM got this feature. IBM JVM has had it for quite some time.

      Do you know if the IBM JVM heap dump tools will work for SUN JVM dumps as well?
      (for example


      Author's profile photo Markus Kohler
      Markus Kohler
      Blog Post Author
      Hi Dagfinn,
      As far as I know the IBM tools do not work out of the box with this file format.
      But it's not too difficult to write a converter from the new Sun hprof format to the IBM format. I know someone at SAP who has already done this 😉


      Author's profile photo Former Member
      Former Member
      Hi Markus

      This was A gud One for starters in Java Engine.
      i have a doubt i though only JDK 1.4.2_09 is supported in netweaver 2004 and Ecc5 correct me
      if i am wrong



      Author's profile photo Markus Kohler
      Markus Kohler
      Blog Post Author
      Hi Siva,
      According to note 716604 you can use at least on Windows 1.4.2_09 or higher. There are some limitations such as that the installer does not work with 1.4.2_10, but in general the note says "Please use Sun J2SE 1.4.2_09 SDK (or higher 1.4.2 versions after they will become available).

      Please let me know whether there's any other official SAP information that says something else.

      In any case you can use the new version for development.


      Author's profile photo Former Member
      Former Member
      When i was installing ECC5 with 1.4.2_10 , i had installtion problem so i switched back to 1.4.2_09 and everything went fine , so i was confused if we could also use a higher version of
      Author's profile photo Simon Kemp
      Simon Kemp
      Thanks Markus for this. I will pass this onto our support team... I think they will find it useful.