wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes javadoc on .class? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "javadoc on .class?" Watch "javadoc on .class?" New topic
Author

javadoc on .class?

Warren Bell
Ranch Hand

Joined: Dec 20, 2000
Posts: 56
I recently had someone tell me that you can run javadoc on compiled classes. I thought you had to have the source code? Am I missing something? I believe I know the answer, but can someone clarify this for me.

Thanks,

Warren


Warren Bell
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Well, I just tried it and javadoc complained because it couldn't find any source code. So my first instinct is to say no, you can't run javadoc on .class files.

But I am looking into it further because I am not 100%. Maybe there is a switch or some secret way of doing it.


GenRocket - Experts at Building Test Data
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
I see nothing in the javadoc documentation that indicates it can produce documentation from compiled class files. The description of the tool clearly indicates that it parses source files for documentation.

If it could create documentation from compiled class files, such documentation would be very sparse, including merely a listing of classes and interfaces, their relationships, and listings of the methods and fields defined in the classes and interfaces. Remember, of course, that comments (documentation) in the source files are not included in the compiled class files.
[ May 17, 2004: Message edited by: Dirk Schreckmann ]

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Warren Bell
Ranch Hand

Joined: Dec 20, 2000
Posts: 56
I didn't think you could. I have decompied classes before, and its a mess. You can barley figure out what is going on.

Thanks,

Warren
Nick George
Ranch Hand

Joined: Apr 04, 2004
Posts: 815
mmm... barley


I've heard it takes forever to grow a woman from the ground
Warren Bell
Ranch Hand

Joined: Dec 20, 2000
Posts: 56
mmm...wheat, mmm...rye, mmm...oats, mmm...
 
 
subject: javadoc on .class?
 
Similar Threads
NX: Specs on code commenting
Other components in a JTable
Strange overriding
Javadoc and nested classes?
using wildcards in java