IntelliJ IDEA 2024.3 Help

Java bytecode decompiler

IntelliJ IDEA features the Java bytecode decompiler that shows you compiled bytecode as if it were human-readable Java code. The decompiler is enabled by default.

Open a compiled .class file in the editor.

If it's the first time that you're opening a compiled file, the IDE prompts you to agree to the specified terms and conditions in the JetBrains Decompiler dialog. If you click Accept, the dialog will not be displayed in the future, and the appropriate code will be automatically decompiled.

JetBrains Decompiler dialog

After that the IDE will show you the human-readable Java code without actually converting .class files into .java files.

The yellow notification panel above the editor informs you that you’re reading a decompiled file.

A compiled file in the editor that has been automatically decompiled by IDE

Show bytecode for compiled files

By default, the IDE shows you decompiled code in compiled files. If necessary, you can open the bytecode viewer for any compiled class.

Open a compiled file in the editor and select View | Show Bytecode from the main menu.

The bytecode viewer provides basic syntax highlighting, and it shows the information in a way that is comfortable for reading.

Compiled file opened in the bytecode viewer
Last modified: 11 February 2024