United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6488116 : jhat: give a meaningful error message when presented with an ASCII format heap dump

Details
Type:
Bug
Submit Date:
2006-10-31
Status:
Closed
Updated Date:
2015-05-08
Project Name:
JDK
Resolved Date:
2015-05-08
Component:
core-svc
OS:
generic
Sub-Component:
tools
CPU:
generic
Priority:
P4
Resolution:
Won't Fix
Affected Versions:
6
Fixed Versions:
tbd_major

Related Reports

Sub Tasks

Description
jhat requires heap dumps in binary format.  This is documented in the
troubleshooting guide and on the man page.

If a user tries to run jhat on an ASCII format file, they will see:

% jhat java.hprof.txt
Reading from java.hprof.txt...
java.io.IOException: Version string not recognized at byte 18
        at com.sun.tools.hat.internal.parser.HprofReader.readVersionHeader(HprofReader.java:369)
        at com.sun.tools.hat.internal.parser.HprofReader.read(HprofReader.java:161)
        at com.sun.tools.hat.internal.parser.Reader.readFile(Reader.java:79)
        at com.sun.tools.hat.Main.main(Main.java:143)


jhat should print a user-understandable message.  Maybe something like:
  This is an ASCII format JAVA PROFILE 1.0.1 file.  jhat requires binary
  format heap dump files.

                                    

Comments
JHAT was removed with JDK-8059039, closing this as Won't Fix.
                                     
2015-05-08



Hardware and Software, Engineered to Work Together