Look Inside Compiled Code with Java Bytecode Decompiler
When something is there for us day after day, we tend to take it for granted. In IntelliJ IDEA, there are several features that many people don’t even notice, even as they use them all the time. One of these features is the Java bytecode decompiler.
The Java bytecode decompiler in IntelliJ IDEA is a built-in tool that allows you to read compiled bytecode as if it were human-readable Java code.
Let’s say you have a library packed in a .jar file. You just downloaded it from the Internet and don’t have the source code for it. How do you look inside and make sure it actually has what you need?
If you open a .class file in a text editor, you’ll only see the bytecode that sometimes makes little sense. However, if you open the same file in IntelliJ IDEA, the IDE shows you the human-readable Java code from your .jar, without actually converting .class files into .java files. The yellow notification panel above the editor informs you that you’re reading a decompiled file.
The decompiler can not only convert bytecode to Java code, but it can also debug it. This means you can use breakpoints anywhere in the decompiled code with almost the same experience that you’d normally have when you debug your source code.
Of course, you can always open the bytecode viewer for any compiled class. Open the necessary .class file in the editor in IntelliJ IDEA and then select View | Show Bytecode from the main menu. If you’re not seeing this option, make sure that the bundled Bytecode Viewer plugin is enabled.
The bytecode viewer provides basic syntax highlighting, and it shows the information in a way that is comfortable for reading.
The decompiler works in both IntelliJ IDEA Ultimate and IntelliJ IDEA Community Edition. It is powered by the Java Bytecode Decompiler plugin, which is bundled and enabled by default.
This tool has been a part of IntelliJ IDEA for ages. So if you already have the IDE, give it a try and let us know what you think in the comment section. If you don’t have IntelliJ IDEA yet, grab a build or stay tuned for more news, because very soon we’re releasing IntelliJ IDEA 2020.1, which features our Java bytecode decompiler together with a range of exciting features and updates.
Subscribe to Blog updates
Thanks, we've got you!
The Best of IntelliJ IDEA’s HTTP Client
In today's fast-paced tech world, easy and efficient management of web services and APIs is crucial. That's where IntelliJ IDEA's HTTP Client steps in, turning complex HTTP requests into a walk in the park. The HTTP Client is a feature-rich, text-based tool in IntelliJ IDEA Ultimate. It seamlessl…
Profile on the Fly With the IntelliJ Profiler
At JetBrains, we believe that profiling should be simple and accessible to all developers, regardless of their level of expertise. That’s why the IntelliJ Profiler puts ease of use and seamless integration at the forefront of its mission. In previous releases, we introduced a range of features to s…
History of Gradle Delegation Process in IntelliJ IDEA
Nowadays, a build tool is an essential part of any project, and IntelliJ IDEA integrates with the majority of them. Among the most popular build tools is Gradle. We’d like to give a brief historical overview of its integration with IntelliJ IDEA and the delegation process implemented inside the I…
How to Work With Protobuf-Maven Projects in IntelliJ IDEA
Protobuf, short for Protocol Buffers, is a language-agnostic data serialization format developed by Google. It is designed to efficiently and reliably serialize structured data to communicate between different systems and programming languages. Protobuf offers a compact binary representation of data…