找出JAR文件包含哪些软件包,类和方法

发布于 2025-01-27 14:07:47 字数 349 浏览 3 评论 0 原文

我有一个带有语法突出显示的Java代码编辑器,带有代码提示菜单和快速操作。编辑器用C#编写。再次,该编辑器用于编辑Java代码!我需要知道罐子库中哪些软件包,类,方法,以便进一步 代码提示和语法突出显示。

我有一个想法将罐子分解以找出“它的内容”,但我怀疑还有另一种更有效的方法可以实施它。

这就是我的编辑器的外观: ”在此处输入图像说明”

I have a Java code editor with syntax highlighting, with a code hint menu and quick actions. The editor is written in C#. Once again, this editor is for editing Java code! I need to know what packages, classes, methods are in the Jar library (Jar file) for further
code hinting and syntax highlighting.

I have an idea about decompiling the Jar to find out "its contents", but I suspect that there is another more efficient way to implement this.

This is what my editor looks like: enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

仙女山的月亮 2025-02-03 14:07:47

事实证明它相对简单。我找到了'JD-GUI'存储库( https://github.com/java-decompiler/ jd-gui ),这是应用程序: http://java-decompiler.github.github。 io/)。该程序本身是用Java编写的,是基于JD核心核心的非常好的Java分解器( https://github.com/java-decompiler/jd-core )。

我喜欢这个应用程序,因为。它详细概述了整个分解应用程序(您可以看到哪些软件包,类,方法,字段在罐子中),这正是我所需要的!因为它是一个开源存储库,所以我只是对其进行了一些调整,现在在分解时,该程序将使用“ JAR文件的内容”保存XML文件。然后,我在C#中编写了XML解析器,以加载数据并与它们进一步合作。仅此而已...

用JAR内容编辑的JD-GUI保存XML文件:加载jar file时(在同一文件夹中)xml文件,将保存此文件的内容(在同一文件夹中) 。

It turned out to be relatively simple. I found the 'jd-gui' repository (https://github.com/java-decompiler/jd-gui), here is the app: (http://java-decompiler.github.io/). The program itself is written in java and is a very good java decompiler based on the jd-core core (https://github.com/java-decompiler/jd-core).

I liked this application, because. it implements a detailed overview of the entire decompiled application (you can see what packages, classes, methods, fields are in the jar), that's exactly what I needed! Because it was an open source repository, I just tweaked it a little, and now when decompiling, the program saves the xml file with the "contents of the jar file". And then I wrote an xml parser in c# to load data and further work with them. That's all...

Code with edited jd-gui saving xml file with jar content: https://drive.google.com/drive/folders/1_opg0BBIrmHoZ125F0Fyl9n_0o4xutiL?usp=sharing When loading a jar file, next to it (in the same folder) an xml file with the contents of this file will be saved.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文