Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to decompile Java class files

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

In this issue, the editor will bring you about how to decompile the Java class file. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

How to decompile Java class files

What program can be used to compile class files to get java code or JVM-compiled code? In the performance discussion on this site, we often see decompilation files to see how the compiler optimizes something.

The art of decompilation can also be thought of as reverse engineering. Although sometimes you don't always have access to binaries when reverse engineering.

No one mentioned bytecodeviewer.com, which can be decompiled to java source code and bytecode (for java source code is based on JAD)

Www.javadecompilers.com

It is the most popular Java compiler, written in C++, quickly outdated, and does not support Java5 and later versions of this site also lists other tools.

As Salvador Valencia said in the comments (September 2017), javadecompiler provides a SaaS that allows you to upload .class files to the cloud and return decompiled code. The final version of JSR 176, which defines the main features of J2SE 5.0 (Java SE 5), was released on September 30th, 2004. The latest version of Java supported by the famous Java decompiler JAD written by Mr. Pavel Kouznetsov is JDK 1.3.

Java Decompiler (a fast Java decompiler) has explicit support for decompilation and analysis of Java 5 + ".class" files. A good GUI:

It applies to compilers from JDK 1.1.8 to JDK 1.7.0 and others (Jikes,JRockit, etc.). It has an online real-time demo version and is actually fully functional! You can delete a jar file on the page and look at the decompiled source code without installing anything.

For example: Procyon: open source (Apache 2) Krakatau: open source (GPLv3) CFR: open source (MIT) JAD DJ Java Decompiler Mocha there are many more.

These generate Java code that allows you to see the JVM bytecode. To view the Java source code, check some decompilers. Search for jad. If you want to see the bytecode, just use the javap that comes with JDK.

I tried a few, and Procyon is the best for me. It is under active development and supports many of the features of the latest version of Java.

Here are other things I've tried: CFR is OK, but decompilation often fails. I'll keep a close eye on this. Also actively develop and support the latest Java features. Krakatau takes a different approach, trying to output the equivalent Java code rather than trying to rebuild the original source, which may make the obfuscated code better. According to my tests, it's roughly the same as Procyon, but I'm still happy to have something different. I do have to use the-skip command line flag, so it doesn't stop the error. Actively developed, it is interesting that it is written in Python. JD-GUI works, but the output of Procyon is much better. This is a page that compares the Procyon output with the original and JD-GUI. JD-GUI can also be used as an Eclipse plug-in, and it doesn't work for me at all. It does not seem to be open source, and the development seems to be sporadic. JAD

Works, but only Java 1.4 and lower are supported. It can also be used as an Eclipse plug-in. Is no longer in development.

I use JAD Decompiler.

JD-GUI is really great. You can open a jar file and browse the code as if you were using IDE. good thing.

The above is the editor for you to share how to decompile the Java class file, if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report