You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have a runtime image without module jdk.crypto.ec but try to connect to a service that needs it like Discord, this library complains that the hostname does not match which is plainly wrong and very misleading:
$ rm -rf jre
$ ~/.gradle/jdks/jdk-17+35/bin/jlink --add-modules jdk.jshell,jdk.zipfs --output jre
$ jre/bin/jshell.exe -c nv-websocket-client-2.6.jar
| Welcome to JShell -- Version 17
| For an introduction type: /help intro
jshell> new com.neovisionaries.ws.client.WebSocketFactory().createSocket("wss://gateway.discord.gg").connect()
| Exception com.neovisionaries.ws.client.HostnameUnverifiedException: The certificate of the peer does not match the expected hostname (gateway.discord.gg)
| at SocketConnector.verifyHostname (SocketConnector.java:171)
| at SocketConnector.doConnect (SocketConnector.java:126)
| at SocketConnector.connect (SocketConnector.java:83)
| at WebSocket.connect (WebSocket.java:2307)
| at (#1:1)
jshell>
$ rm -rf jre
$ ~/.gradle/jdks/jdk-17+35/bin/jlink --add-modules jdk.jshell,jdk.zipfs,jdk.crypto.ec --output jre
$ jre/bin/jshell.exe -c nv-websocket-client-2.6.jar
| Welcome to JShell -- Version 17
| For an introduction type: /help intro
jshell> new com.neovisionaries.ws.client.WebSocketFactory().createSocket("wss://gateway.discord.gg").connect()
$1 ==> com.neovisionaries.ws.client.WebSocket@6f4a47c7
jshell>
The text was updated successfully, but these errors were encountered:
If you have a runtime image without module
jdk.crypto.ec
but try to connect to a service that needs it like Discord, this library complains that the hostname does not match which is plainly wrong and very misleading:The text was updated successfully, but these errors were encountered: