For Programmers: Free Programming Magazines  


Home > Archive > Java Help > March 2004 > Display of methods in a .class file









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Display of methods in a .class file
Morgo the Friendly Drelb

2004-03-27, 12:30 am

Platform: Windows 2000
JDK 1.3.1_09

Java newbie here, is there any way of displaying methods that
are in a .class file? I have a compiled object and would like
to know what methods it has and what datatypes are expected.

TIA
Christophe Vanfleteren

2004-03-27, 12:30 am

Morgo the Friendly Drelb wrote:

> Platform: Windows 2000
> JDK 1.3.1_09
>
> Java newbie here, is there any way of displaying methods that
> are in a .class file? I have a compiled object and would like
> to know what methods it has and what datatypes are expected.
>
> TIA


Any decent IDE does that for you.
Or you could look at the java.lang.reflect classes to get what you want.

--
Kind regards,
Christophe Vanfleteren
Wendy S

2004-03-27, 12:30 am

"Morgo the Friendly Drelb" <morgotfd@yahoo.com> wrote:
> Platform: Windows 2000
> JDK 1.3.1_09
> Java newbie here, is there any way of displaying methods that
> are in a .class file? I have a compiled object and would like
> to know what methods it has and what datatypes are expected.


The class file disassembler 'javap' will do that. I assume it was there in
1.3.1...

http://java.sun.com/j2se/1.4.2/docs...dows/javap.html

--
Wendy in Chandler, AZ


Lothar Kimmeringer

2004-03-27, 12:30 am

On Thu, 25 Mar 2004 14:14:34 -0700, Wendy S wrote:

> "Morgo the Friendly Drelb" <morgotfd@yahoo.com> wrote:
>
> The class file disassembler 'javap' will do that. I assume it was there in
> 1.3.1...


It's there since the good old 1.0-days ;-)


Regards, Lothar
--
Lothar Kimmeringer E-Mail: spamfang@kimmeringer.de
PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)

Always remember: The answer is forty-two, there can only be wrong
questions!
Morgo the Friendly Drelb

2004-03-27, 12:30 am

Thanks for the prompt responses! Javap it is....


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com