Can you list imports from a JAR file?
Is it possible to list the used imports from a JAR File like you can with a DLL in .NET?
I found programs that can list the content of th开发者_运维问答e JAR file, like:
http://jarbrowser.sourceforge.net/
but I'd like to list the imports.
You could try Jdepend.
After compilation the import statements are no longer available, only the types of the objects, you would need to analyze the byte code to do that.
For more details see class file format or even more java.sun.com/docs/books/jvms/second_edition/ClassFileFormat-Java5.pdf
精彩评论