How can I extract symbols defined in a jar file using Delphi?

I have a java jar file composed of some classes, each class has some variables, constants, functions, ...

I want to extract the name of these classes, variables, constants, functions and function parameters in my Delphi program.

Work like JD-GUI . How can i do this? Does the java sdk command line have this?


source to share

2 answers

Emil M. Santos did all the work for you.

He is the author of Class Explorer : A utility for viewing the low-level content of a compiled Java class file (.class).

(source: )

You can get its (Delphi for sure) source code here .

Good luck.



I once wrote a class parser for Delphi. You can find it here:

This is from 2004, but still needs to work if the file class format hasn't changed significantly since then.

The parser is part of the free ESS-Model tool that generates static class diagrams.

Please note that the parser only works with class files. If you want to parse jar files, you need to first unzip the jar file and extract the class files it contains (a jar file is just a standard zip file with a ".jar" extension).



All Articles