Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need a documentor tool

Status
Not open for further replies.

waynea

Programmer
Jul 11, 2000
41
US
Excuse the length of this post, but I'm learning to work in java the stupid way: I have a fairly complex program written by someone else that I need to modify, and I'm getting lost in the shuffle. I program in several other languages, but I'm new to the OO stuff. Does anyone know of a tool that will read the java project files and print out a flowchart or at least some kind of listing showing which calls are going where? I have some slight familiarity with VB, but it seems to me as if this java program is calling the same modules from several different places, and within the context of what the applet does, that doesn't really make sense to me. If I could see a breakdown of what's happening, I could make some sense of it. [sig][/sig]
 
Java actually has a built in tool for each class. You bascially need the JDK kit from java.sun.com In it their is a utility called javadoc. It is a dos based program and if you give it a .class file it will tell you everything the class does and what it inherits from etc..... Should help you a little bit.
I have never seen a complete source trace program for java, their might be something like that in JBuilder by Borland????

good luck :) [sig]<p>ackka<br><a href=mailto:tmoses@iname.com>tmoses@iname.com</a><br><a href= my site</a><br>"Do No Harm, Leave No Tracks"<br>
ICMP Summer 2000, 2600 Article<br>
<br>
[/sig]
 
The closest to this is using the debugger in an IDE...I'm not sure if anyone actually produces a visual representation of the program flow, but wouldn't it be useful!

My advice for debugging a confusing system is to try and create a [tt]public static void main(String[] args){ ....code here.. }[/tt] method for each class, so that you can run the parts independently...i.e. a unit test method. This can help you to isolate parts of the system so that you can examine their individual behaviour... [sig]<p> <br><a href=mailto: > </a><br><a href= home</a><br> [/sig]
 
tools like rational rose ( and something else that i cant remen\mber the name of ( can convert java source to a uml diagram of course if you are not familiar with uml it might take a bit of time to learn (worth it if you want to go onto serious OO design). some ides also include this sort of tool but they're usually the ones you pay for [sig]<p>Chris Packham<br><a href=mailto:kriz@i4free.co.nz>kriz@i4free.co.nz</a><br><a href= > </a><br>A thousand mokeys at a thousand machines, it happened, it got called the internet.[/sig]
 
Thanks for the replies. I downloaded a trial copy of Visual J++ and was able to use it to track down what I needed, so I guess I'll go with that since it's way more comprehensive than what I was using. Thanks again. [sig][/sig]
 
I'd like to second the post concerning JavaDoc!! I've found it INCREDIBLY useful, even at a company level (not to mention a personal programming level). Running this tool will give you a series of interactive HTML files allowing you to see all the classes, interfaces, etc... you can customize the level of visibility (only public, public and package, or public package and private), view classes by package... it's so useful. For an example of Javadoc, take a look at . Sun ran Javadoc over all their standard classes, and this is what came out- I have it bookmarked. Without this, I would be lost!

So I would DEFINITELY look into Javadoc. If it seems weird to you (yes, it is run through DOS, but it's not hard), let me know and I'll give you a hand. If you're not using Javadoc, you might be making things much harder for yourself.

Best of luck!

[sig]<p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href=] :: imotic :: website :: [</a><br>"light the deep, and bring silence to the world.<br>
light the world, and bring depth to the silence."[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top