在小程序中查找具有 main 方法的类
我正在尝试使用此工具
https://swingexplorer.dev.java.net/
来查找有关小程序的 Swing 结构的一些信息。 不幸的是,我没有开发这个小程序。 我已经从缓存中提取了小程序的 jar,但是 jar 中有数百个 .class 文件,而且我不知道哪个有 main 方法。
有没有办法精确定位小程序的入口点? 浏览器必须能够弄清楚它才能运行小程序,因此该信息必须位于 jar 中的某个位置(或者可能是与 jar 位于同一目录中的 .idx 文件)。
想法表示赞赏。
I'm trying to use this tool
https://swingexplorer.dev.java.net/
to find some information out about an applet's swing structure. Unfortunately, I didn't develop the applet. I've pulled the jars for the applet from the cache, but there are several hundred .class files in the jars, and I don't know which one has the main method.
Is there a way to pinpoint the applet's entry point? The browser must be able to figure it out to run the applet, so that information has to be somewhere in the jar (or maybe the .idx files that were in the same directory with the jars).
Ideas appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Applet(或 < a href="http://docs.oracle.com/javase/6/docs/api/javax/swing/JApplet.html" rel="nofollow noreferrer">JApplet)比更复杂启动并运行直到程序完成,因此没有单一的
main
方法。 它将由浏览器管理(生命周期教程。)applet 类由部署机制指定(例如 applet/object/embed 标记)。请参阅 部署教程,用于确定如何指定此类型。
The lifecycle of an Applet (or JApplet) is more complicated than start and run until the program is finished so there is no single
main
method. It will be managed by the browser (lifecycle tutorial.)The applet class is specified by the deployment mechanism (e.g. applet/object/embed tags.) See the deployment tutorial for determining how this type is specified.
入口类将位于小程序标签中,或者位于新插件 JRE 6u10+ 小程序的 JNLP 中。 您应该能够通过 grep 查找对 Applet 或 JApplet 类或者 init()V 方法的引用来单独从 jar 中看出它是哪一个。
The entry class will either be in the applet tag, or JNLP for new plugin JRE 6u10+ applets. You should be able to see which one it is from the jar alone by grepping for referecnes to the Applet or JApplet classes or, say, the init()V method.
我试图使用错误的工具来完成任务。
I was trying to use the wrong tool for the task.