当前位置:网站首页>Decompile the jar package and recompile it into a jar package after modification
Decompile the jar package and recompile it into a jar package after modification
2022-06-27 09:33:00 【lgq2016】
Using open source jar Package or supplier jar Packet time , Will find some bug Or the existing functions cannot meet our requirements , Need to be right jar Medium .class File modification . The processing steps are as follows :
1. Use the decompile tool to jar Decompile package into source file
For decompilation tools, please refer to XJAD2.2 Version download address :http://www.blogjava.net/Files/96sd2/XJad2.2.rar
If only a few class Need modification , It can be used directly IDEA perhaps jd-gui Tool open , take .class Directly copy the contents of the file and create a file with the same name .java file ( Need basis jar Set up all the upper directories in the package , such as com.athome.cas.Test.java, Need to create com.athome.cas Such as catalog , take Test.java Put it under the directory )
2. modify java file
For source files .java Write and test functions
3. Compile the whole jar Packages or specific ones java file
use IDEA Open the entire source file , Use bulid Compile the file or the entire project ( You can select individual java The file is compiled as .class)

4. Processing when compiling an error
The following examples are the most common compilation errors :
Util.java:9: error : Package javax.servlet non-existent
import javax.servlet.ServletException
You need to import the corresponding dependency , We can do it in pom.xml Add... To the document pom rely on , The required packages can be queried in the warehouse
If it is a few alone .class Files can be directly opened with compressed files jar package , Compile the generated after modification class The file can be directly dragged in .

边栏推荐
- 多个类的设计
- js中的数组对象
- 使用Aspose.cells将Excel转成PDF
- Apache POI的读写
- [cloud native] 2.3 kubernetes core practice (Part 1)
- main()的参数argc与argv
- How Oracle converts strings to multiple lines
- The largest rectangle in the bar graph of force buckle 84
- Scientists develop two new methods to provide stronger security protection for intelligent devices
- Quelques exercices sur les arbres binaires
猜你喜欢

E+H二次表维修PH变送器二次显示仪修理CPM253-MR0005

How do I get the STW (pause) time of a GC (garbage collector)?

视频文件太大?使用FFmpeg来无损压缩它

【mysql篇-基础篇】通用语法1

When multiple network devices exist, how to configure their Internet access priority?

The markdown plug-in of the browser cannot display the picture
![[vivid understanding] the meanings of various evaluation indicators commonly used in deep learning TP, FP, TN, FN, IOU and accuracy](/img/d6/119f32f73d25ddd97801f536d68752.png)
[vivid understanding] the meanings of various evaluation indicators commonly used in deep learning TP, FP, TN, FN, IOU and accuracy

Nosql 数据库 -Redis 安装
![文件名设置导致writelines写入报错:OSError: [Errno 22] Invalid argument](/img/08/2d4f425e6941af35616911672b6fed.png)
文件名设置导致writelines写入报错:OSError: [Errno 22] Invalid argument

Installation and usage of source insight tool
随机推荐
初步认识pytorch
内部类~锁~访问修饰符
高等数学第七章微分方程
[system design] proximity service
Brief introduction to SSL encryption process
Markem Imaje Marken IMAS printer maintenance 9450e printer maintenance
【mysql篇-基础篇】通用语法1
JS 客户端存储
枚举?构造器?面试Demo
ucore lab5
Digital ic-1.9 understands the coding routine of state machine in communication protocol
main()的参数argc与argv
有关二叉树的一些练习题
如何获取GC(垃圾回收器)的STW(暂停)时间?
openpyxl表格读取实例
The most direct manifestation of memory leak
Video file too large? Use ffmpeg to compress it losslessly
DV scroll board width of datav rotation table component
巴基斯坦安全部队开展反恐行动 打死7名恐怖分子
The largest rectangle in the bar graph of force buckle 84