我正在尝试运行以下 jarsigner
命令:
jarsigner -keystore C:/keystore.p12 -storepass xyz jars_to_be_signed.jar friendly_name -tsa http://sha256timestamp.ws.symantec.com/sha256/timestamp -storetype pkcs12 signedjar C:/signed.jar
没有timestamping
即 -tsa option
,它正确地给出了签名的 jar 。因此签名有效。
但是用timestamping
即 -tsa option
它给出了以下错误:
jarsigner: unable to sign jar: java.net.SocketException: Permission denied: connect
点击 url http://sha256timestamp.ws.symantec.com/sha256/timestamp ,我得到以下输出 Invalid Content-Type: <empty>
表示80端口可以通信
我之前启用并禁用了 Windows 防火墙。现在,Windows 防火墙处于 -- Windows 防火墙状态:关闭
而且 Kaspersky Security 也没有启用防火墙。
监听端口中的80端口正在被系统进程使用。所以我没有在端口 80 上杀死这 2 个进程。
SocketException: Permission denied: connect
可能是什么原因? ?
最佳答案
通过重新安装 Kaspersky Security 修复了“SocketException:权限被拒绝:连接”问题。 如果有人遇到此问题,请检查防火墙是否阻止了与您的电脑的连接。
关于java - 如何修复在给出 "SocketException: Permission denied: connect"的命令行窗口中使用的 jarsigner 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48422207/