Viewing contents of a .jar file

后端 未结 30 937
一向
一向 2020-12-02 03:54

What would be the easiest way to view classes, methods, properties, etc. inside a jar file? I\'m looking for something equivalent to the very useful Lutz Roeder .NET Ref

相关标签:
30条回答
  • 2020-12-02 04:35

    If I understand correctly, you want to see not only classes but also methods, properties and so on. The only tool I know that can do it is Eclipse - if you add a jar to project classpath, you would be able to browse its classes with methods and properties using usual package explorer.

    Anyway, this is a good idea for a good standalone Java tool

    0 讨论(0)
  • 2020-12-02 04:35

    Your IDE should also support this. My IDE (SlickeEdit) calls it a "tag library." Simply add a tag library for the jar file, and you should be able to browse the classes and methods in a hierarchical manner.

    0 讨论(0)
  • 2020-12-02 04:37

    Bndtools provides a free JAR viewer plugin for Eclipse.

    Add the Eclipse update site and install only the viewer.

    enter image description here

    0 讨论(0)
  • 2020-12-02 04:39

    Jad is klunky and no longer maintained. I've switched to "Java Decompiler", which has a slick UI and support for new language features.

    Every decompiler I've used, though, runs into code it doesn't successfully decompile. For those, it helps to understand the disassembled Java byte code produced by the standard JDK tool, javap.

    0 讨论(0)
  • 2020-12-02 04:39

    You could try JarNavigator to view and search contents of a jar file.

    0 讨论(0)
  • 2020-12-02 04:41

    Use WinRar. It will open the folder structure for you in intact manner. Also allows in-archive editing, while preserving paths.

    Afterall, a JAR file is a ZIP archive only.

    0 讨论(0)
提交回复
热议问题