aspose file tools
The moose likes Java in General and the fly likes calculate heap info Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "calculate heap info " Watch "calculate heap info " New topic
Author

calculate heap info

jason chan
Greenhorn

Joined: Feb 11, 2010
Posts: 5
Hello..I have this code to calculate the heap info..
but i need to make this code work when JVM starts..
which means that this code has to start itself when JVM starts and then calculate the heap info at that time
can anyone help me out with this
thanks


Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32708
    
    4
That makes for confusing code, using Runtime and RunTime classes.

How about putting that code in a static initialiser block in your class with the main method in? It will then be executed when that class is loaded.
jason chan
Greenhorn

Joined: Feb 11, 2010
Posts: 5
thanks for the reply..
i am sorry was a not clear with my problem..
Well what i am looking for is that when JVM starts, a java component should attach itself to the JVM and calculate the heap info automatically..
W Fay
Greenhorn

Joined: Feb 17, 2010
Posts: 3
Sounds like you want some kind of JVM agent...
jason chan
Greenhorn

Joined: Feb 11, 2010
Posts: 5
Hi.. Can anyone tell me if i can run this code for multiple JVM's
currently it is for one JVM..but what if there are multiple JVM's in a single box..
I am looking for a multi JVM support...
thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: calculate heap info
 
Similar Threads
Start Java Application when the web server starts
two JVM under one Processor
GC doubt
monitor heap info when JVM starts
OutOfMemoryError