Liubsyy / JarEditor

IDEA plugin for directly editing and modifying files in jar without decompression. (一款无需解压直接编辑修改jar包内文件的IDEA插件)
Apache License 2.0
514 stars 46 forks source link
editor idea-plugin intellij-plugin jar jetbrains-plugin

JarEditor liubsyy

English | 简体中文

License downloads release sdk Featured|HelloGitHub

IDEA plugin for modifying files in jar directly without decompression, including class and resource files.

Plugin marketplace : https://plugins.jetbrains.com/plugin/24397-jareditor

Features

Quick start

1. Install plugin from marketplace

First install the plugin JarEditor from marketplace, IDEA at least version 2020.3

2. Edit and Build Jar

After installation , you can see a tab page to switch to Jar Editor in the .class decompiled file.

External jar : File->Project Structure->Libraries->Add Library , then you can see the decompiled jar.
Nested jar : Right click on nested jar->JarEditor->Structure->Expand Nested Jar

After modification, click Save(Compile) to compile and save the currently modified java content.

Finally click Build Jar to write the compiled and saved class file into the Jar package.

Modifying the resource files in the jar package is also supported.

Here is an example:

3. Class bytes tool

For obfuscated jars, the decompilation result is not satisfactory. In this case, you can use tools to directly modify the bytecode. Click the Class bytes tool icon to select the tool

4. Other operations of JarEditor

In the project view of the jar package, right-click to see JarEditor->New/Delete and other operations, where you can add/delete/rename/copy/paste/export files.

Click the Search icon to search the contents of the jar package. If it is a class jar, it will be searched based on the decompiled content.

Some mechanisms

SDK Default Versions

When compiling and selecting SDK Default, the runtime JDK (JBR) integrated by Jetbrains is used. If SDK Default is not selected, the JDK installed by the specific user will be used.

IDEA JDK
IDEA 2020.3 - IDEA 2022.1 JBR JDK11
IDEA 2022.2 - IDEA 2024.1 JBR JDK17
IDEA 2024.2 and later JBR JDK21