Cracking/De-compile Open JAR Files: A Developer’s Guide to De-compiling

Chandima Veneera Rathnayake
3 min readApr 27, 2023

--

In this blog post, we’ll explore the process of decompiling JAR files in Java. You’ll learn why someone might want to decompile a JAR file, how to choose a decompiling tool, and how to use that tool to extract the code within the JAR file. We’ll also discuss potential issues and offer tips and resources for readers who want to learn more.

If you’re a Java developer, you may have come across JAR files and wondered how to extract the code within them. In this blog post, we’ll show you how to decompile JAR files using two popular IDEs — VS Code and IntelliJ IDEA — without the need for a third-party application like JD-GUI. The best part? It works on Linux too! We’ll provide step-by-step instructions and tips to help you successfully decompile JAR files and explore their contents. By the end of this post, you’ll have a solid understanding of how to decompile JAR files using VS Code and IntelliJ IDEA and why it’s a valuable skill for any Java developer to have.

The following plugins are available for vs code and IntelliJ Idea.

For vs code
01. Java Decompiler

Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.

Image 01

https://marketplace.visualstudio.com/items?itemName=dgileadi.java-decompiler

For IntelliJ Idea

01. Java decompiler
(
https://plugins.jetbrains.com/plugin/7100-java-decompiler)
02. Jadax class decompiler
Press Ctrl+Alt+S to open the IDE settings and select Plugins.

Image 02

Decompiling JAR files using VS Code and IntelliJ IDEA is a straightforward process. All you need to do is unzip the JAR file and launch your IDE of choice. Here’s how:

  1. Locate the JAR file you want to decompile and create a new folder where you want to extract its contents.
  2. Right-click on the JAR file and select “Extract Here” or “Extract to folder” to extract the files.
  3. Open your IDE of choice, whether it’s VS Code or IntelliJ IDEA.
  4. In VS Code, click on “File” > “Open Folder” and navigate to the folder where you extracted the JAR file contents.
  5. In IntelliJ IDEA, click on “File” > “Open” and select the folder where you extracted the JAR file contents.
  6. Once you’ve opened the folder in your IDE, you can navigate to the extracted Java class files and start exploring the code.

That’s it! By following these simple steps, you can easily decompile JAR files using VS Code or IntelliJ IDEA without the need for a third-party application.

By learning how to extract the code within JAR files, you can gain a better understanding of how Java applications work and improve your development skills. If you have any questions or feedback, please feel free to leave a comment below. Thanks for reading!

References

[1] https://code.visualstudio.com/docs/editor/extension-marketplace
[2] https://plugins.jetbrains.com/

--

--