Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javap and jar files

 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jar file. I would like to know all the method names with their signatures in all the classes present in the jar file.

javap.exe utility helps me to some extent, but it seems to be working only
on a single class file.

Is there a tool that works like javap but works on a complete jar file or a package?
 
Nikhil Menon
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use DJ Java Decomplier instead.
It decompiles all your class files.
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On GNU/ Linux, I can use:

for my archiv 'jruler.jar'.
'grep' and 'sed' are available for windows too.
And a powerfull commandshell (sh.exe).

The expression $(x) returns the result of the command x, which is, in this case, the result of a pipe.
a) the well known jar.
b) grep, to filter out Manifest, images and other stuff
c) sed, to strip off the fileextension '.class'

I don't know whether there is a native $(x)-equivalent on windows, but perhaps you aren't using windows at all... ?
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nikhil: I am not interested in the complete source code.
Only the list of classes and their exposed methods. JavaDocs would have perfect, but
We do not have access to the source code. Moreover the number of classes is more.

Stefan: Thanks for the Unix Update. But we are using Windows 2K.
I will try to see if I can find equivalent commands in NT Scripting Language.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic