场景:mac笔记本打包文件之后在mac上解压报以下错误
报错:
Archive:test.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
note:test.zip may be a plain executable, not an archive
unzip: cannot find zipfile directory in one of test.zip or
test.zip.zip, and cannot find test.zip.ZIP, period.
解决办法:
使用jar 解压
解决步骤:
1.root用户创建mkdir test
2.上传jdk文件到test目录
,解压jdk
tar -xvf jdk-8u111-linux-x64.tar.gz
3.配置java环境变量
export JAVA_HOME=/软件目录/test/jdk1.8.0_111 --修改软件目录
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/jre/lib/ext
4.测试java环境变量是否配置正确
java -version
which jar
5.上传压缩包到test
,执行解压命令,成功解压
jar xvf test.zip




