Observe a Java Program during runtime

A

A. Meyer

Hello folks,

I have just downloaded an open-source project in java and i am trying to
understand it and analyse it, in order to use it for my own work. For
this purpose I just want to observe how the program behaves during
runtime (i.e. which objects are instantiated, which methods are
called...). I am using the eclipse 3.2 IDE. The debugger of eclipse
seems to be not very appropriate for such task.

I have two fundamental questions: is my proceeding to understand the
open source project the right one? And if yes how can I observe with the
help of eclipse which parts of the program are being - during the
runtime - activated? I have also been thinking of extracting UML
diagrams form the program, but the 1st approach seems to me to be the
more pragmatic one.

Any hint will be much appreciated.
Thanks in advance
Amir


P.S.: I aopologize if this is not the right forum for my problem and
would be thankful if you can tell be about mor convenient one!
 
M

Manish Pandit

Hi,

The best way would be to look at the exposed API, and then drill down
further to look into the interactions. What you can also do is reverse
engineer the code to get sequence diagrams and class diagrams - that
will give you a higher degree of readiblity. Ofcourse you will need
something like togetherJ or the (trial) version of Omondo Eclipse
plugin).

I am not sure which product you downloaded, but you might want to start
with the very core, exposed calls (maybe more like the entry point
method if it is a product vs. a library like apache commons).

Just my 2c :)

-cheers,
Manish
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top