如何将 .class 文件转换为 .java 文件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/30341370/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-02 16:57:51  来源:igfitidea点击:

How to convert .class file to .java file?

javaclassdecompiling

提问by user3497375

I am trying to convert a .classfile to .java. I have only the .classfile. I used jad, but I'm getting error as:

我正在尝试将.class文件转换为.java. 我只有.class文件。我使用了jad,但出现以下错误:

 The class file version is 49.0( only 45.3, 46 and 47 are supported)  JavaClassFileParseException.

How do I resolve this issue? Kindly provide your valuable inputs.

我该如何解决这个问题?请提供您的宝贵意见。

The Simple way to do is using: SeeMyCode

简单的方法是使用:SeeMyCode

采纳答案by Alaa Abuzaghleh

use Java Decompiler http://jd.benow.ca/in it you can open jar, or .class and it will converted to java source.

使用 Java Decompiler http://jd.benow.ca/在里面你可以打开 jar 或 .class ,它会转换成 java 源代码。

回答by Nitin Dandriyal

It's because you care using a lower version of Java than the one that was used for compiling the class

这是因为您关心使用的 Java 版本低于用于编译类的 Java 版本