报错:It has been compressed and nested jar files must be stored without compression. Please check

对springcloud的jar在windows下用解压工具更新增量的class文件后放到线上用java -jar命令启动时报:It has been compressed and nested jar files must be stored without compression. Please check the mechanism used to create your executable jar file

解决方案:

1、在线上创建一个文件夹

mkdir   bak

2、把线上的jar包copy到bak下

copy   xxx.jar   bak

3、对bak下的xxx.jar进行解压缩

jar xf xxx.jar

4、把xxx.jar文件删除

rm -f xxx.jar

5、把相关的class文件覆盖到解压出来的相对应的class

6、重新打包xxx.jar

在bak下执行:jar cf0M xxx.jar *

7、然后把这个新打包的xxx.jar覆盖原来的xxx.jar,重新启动

你可能感兴趣的:(springcloud)