获取源代码 [英] get the source code
本文介绍了获取源代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有一个函数或方法来获取程序的源代码并显示它?
i需要显示java程序的源代码简单的hello world就足够了:)
is there a function or a way to get the source code of the program and display it?
i need to display the source code of java program simple hello world would be enough:)
推荐答案
喜欢这个?
Like this?
展开 | 选择 | Wrap | 行号
基本上,如果您有 .java 文件,只需使用编辑器(例如记事本)打开它。如果你不是,你可以使用特定程序从 .class 文件中解码它。 (这可能会有所不同,具体取决于您所在的许可证和国家/地区。)如果您有 .jar 文件,则可以先解压缩 - jar文件只是一个zip文件一个不同的扩展名和一个MANIFEST文件。
问候,
Nepomuk
Basically, if you have the .java file, just open it with an editor (e.g. notepad). If you don''t, you can decode it from a .class file with specific programs. (The legality of this may vary, depending on the licence and country you are in.) And if you have a .jar file, you can unpack that first - a jar file is just a zip file with a different extension and a MANIFEST file.
Greetings,
Nepomuk
两个挑剔:
1)一个jar文件并不总是需要一个MANIFEST文件;
2)如果周围没有.java源文件怎么办?
亲切的问候,
Jos
Two nitpicks:
1) a jar file doesn''t always need a MANIFEST file;
2) what to do if there''s no .java source file around?
kind regards,
Jos
这篇关于获取源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文