1.原因说明
某些时候,打包的jar
文件在Linux和Windows都测试正常,发送给实施后就无法正常运行。原因可能是文件损坏了。
2.md5校验
2.1 Windows系统
# 命令
certutil -hashfile filePath md5
# 实例
certutil -hashfile ./public.jar md5
# 结果
MD5 的 ./public.jar 哈希:
dab5535b5dc4b3e0a1150926a1528d52
CertUtil: -hashfile 命令成功完成。
2.2 Linux系统
# 命令
md5sum filePath
# 实例
md5sum ./public.jar
# 结果
dab5535b5dc4b3e0a1150926a1528d52 ./public.jar
相同的文件在Linux和Windows环境下的md5值是一致的。