Java modified and packaged back to jar after the jar package has been recompiled
1. Get a jar package to be modified
2. My environment is windows, then unzip this jar package, get a bunch of class files, this time to find the class file you need
3. I first use the Jd-gui tool to look at this class file, then copy it, paste it into a Java file, and then edit the file the way you want it to.
4. cmd command to pull out the terminal, using the Javac modified Java file path---"To get the class file again
5. Reuse Jar CVF Test.jar A test.jar is the generated jar A is the folder name, he also has a B folder, the complete directory structure is a/b/example.class the purpose of this command is to take A.B as a package Name in the jar inside.
6. All right, here we are.
If the following error occurs in the project:
Unsupported Major.minor version 51.0 This is because you are compiling a jar package environment that is not in the same version as the Java environment you are working on, and adjusting to the same can solve the problem.