Updating .class file in jar

后端 未结 11 925
南笙
南笙 2020-11-27 05:52

I want to update a .class file in a jar with a new one. What is the easiest way to do it, especially in the Eclipse IDE?

11条回答
  •  误落风尘
    2020-11-27 06:13

    You can find source code of any .jar file online, import the same project in your IDE with basic setups. Make necessary changes in .java file and compile it for .class files.

    Once compilation is done You need to extract the jar file, replace the old .class file with new one.

    And use below command for reconstruct .jar file

    Jar cf test.jar *

    Note : I have done so many time this changes in our project, hope you will find it useful.

提交回复
热议问题