[英]How to decompile a Java .class file from rt.jar
I have extracted a .class file from the rt.jar file in jre1.7, and have attempted to open it using notepad++, however it is unreadable. 我已经从jre1.7的rt.jar文件中提取了一个.class文件,并尝试使用notepad ++打开它,但是它不可读。 How can I decompile the .class file into a .java file so I can view the code? 如何将.class文件反编译为.java文件,以便查看代码?
Please note that I am interested in the decompilation of the code, not viewing the source code provided in the JDK downloads. 请注意,我对代码的反编译感兴趣,而不是查看JDK下载中提供的源代码。
.class
files are the compiled binary files. .class
文件是已编译的二进制文件。 You can't read the Java code from them, but you can run them. 您无法从它们中读取Java代码,但是可以运行它们。 If you want to see the source you usually need .java
files. 如果要查看源,通常需要.java
文件。 These are either packed in the same jar but then the src folder, or they can be downloaded in a seperate package. 它们要么打包在同一个jar中,然后打包在src文件夹中,要么可以单独下载。
Try any of the decompilers listed here: 尝试在此处列出的任何反编译器:
Or use online decompiler - http://www.javadecompilers.com/ 或使用在线反编译器-http: //www.javadecompilers.com/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.