Replace the files in the jar package by command

Replace the files in the jar package by command

need

  1. Modify the static files in the jar package, such as the static directory
  2. Modify additional packages that need to be referenced, such as dynamic link libraries or ini files

static modification

  1. First backup the jar package to be modified

    mkdir jar_tmp
    
  2. Create a new directory for later packaging

    cp demo.jar demo_2.jar
    
  3. Put the package into the directory you just created

    mv deomo_2.jar jar_tmp/
    
  4. decompress

    jar -xvf demo_2.jar
    

    You can view the directory structure after decompression

  5. recompress

    jar -cvf0m demo.jar META-INF/MANIFEST.MF ./
    
  6. Test the modified run

Guess you like

Origin blog.csdn.net/qq_23858785/article/details/129938603