我收到这段代码的“javax.net.ssl.SSLException:连接重置”
ReadableByteChannel rbc = Channels.newChannel(url.getInputStream());
但仅在使用 Open JDK 14 中的 jlink 构建的 Java 14 JRE 下运行时。如果我指向完整的 JDK,代码执行得很好。我怀疑 JRE 中缺少某些东西,但它是什么,为什么 jlink 没有复制丢失的文件?我基于jdeps的jlink命令如下:
"C:\Program Files\Java\jdk-14\bin\jlink.exe" --no-header-files --no-man-pages --compress=2 --strip-debug --add-modules java.base,java.datatransfer,java.desktop,java.logging,java.xml --output %AG14InstallDir%\jre_windows2
我是否缺少 jlink 中的模块?有关如何追踪此问题的任何想法或建议?
按照建议添加调试后,我得到了这个输出。我需要复制什么来修复它?
javax.net.ssl|WARNING|2E|Thread-13|2020-06-07 10:22:24.517 UTC|null:-1|Signature algorithm, ed25519, is not supported by the underlying providers
javax.net.ssl|WARNING|2E|Thread-13|2020-06-07 10:22:24.518 UTC|null:-1|Signature algorithm, ed448, is not supported by the underlying providers
javax.net.ssl|WARNING|2E|Thread-13|2020-06-07 10:22:24.519 UTC|null:-1|No AlgorithmParameters for x25519 (
"throwable" : {
java.security.NoSuchAlgorithmException: Algorithm x25519 not available
at java.base/javax.crypto.KeyAgreement.getInstance(Unknown Source)
at java.base/sun.security.ssl.NamedGroup.<init>(Unknown Source)
at java.base/sun.security.ssl.NamedGroup.<clinit>(Unknown Source)
at java.base/sun.security.ssl.SignatureScheme.<clinit>(Unknown Source)
at java.base/sun.security.ssl.SSLSessionImpl.<clinit>(Unknown Source)
at java.base/sun.security.ssl.TransportContext.<init>(Unknown Source)
at java.base/sun.security.ssl.TransportContext.<init>(Unknown Source)
at java.base/sun.security.ssl.SSLSocketImpl.<init>(Unknown Source)
at java.base/sun.security.ssl.SSLSocketFactoryImpl.createSocket(Unknown Source)
at java.base/sun.net.www.protocol.https.HttpsClient.createSocket(Unknown Source)
.............