File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes hprof/prof Confusion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "hprof/prof Confusion" Watch "hprof/prof Confusion" New topic

hprof/prof Confusion

Chinmay Bajikar
Ranch Hand

Joined: Dec 08, 2001
Posts: 159
Hi all,
I am trying to ues the hprof option for evaluating my code.
But on giving the command as
"java -classic -Xrunhprof:..... classname"
it tells me that classic JVM cannot be run.
When i remove the -classic option and then run,the execution starts
but gives a Windows "Application Error" and exits.
The same runs properly when I give,
"java -Xprof:..... classname"
but does not generate any java.hprof.txt or any such file.
I would like to know what is causing the "Application Error"(I am running Win 2000).
My java -version command gives the foll o/p,
D:\Profiling>java -version
java version "1.4.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_02-b02)
Java HotSpot(TM) Client VM (build 1.4.0_02-b02, mixed mode)
Also I cannot find any details for the -Xprof profiling option for HotSpot.
Please let me know of a link which lets me know the details.
Thanks a lot,

The strength of the Wolf is the pack & the strength of the pack is the wolf....Rudyard Kipling
Chinmay Bajikar
Ranch Hand

Joined: Dec 08, 2001
Posts: 159
Does anybody have any answers on this??
I am really stuck.
muthu muruges
Ranch Hand

Joined: Feb 28, 2003
Posts: 70
It wont generate the prof.txt file automatically. you should interrupt the java process by giving signals to get the profiler menu.
In solaris I use to give ^\ to get the menu, but I dont know what we should give in windows.
After getting that menu you should select the dump option there.
Hope this URL helps:
I agree. Here's the link:
subject: hprof/prof Confusion
It's not a secret anymore!