java.lang.UnsatisfiedLinkError: org.mozilla.jss.ssl.SSLSocket.setSSLDefaultOption
我试图让一些 NSS 代码正常工作,但收到此错误:
java.lang.UnsatisfiedLinkError: org.mozilla.jss.ssl.SSLSocket.setSSLDefaultOption(II)V
at org.mozilla.jss.ssl.SSLSocket.setSSLDefaultOption(Native Method)
at org.mozilla.jss.ssl.SSLSocket.setSSLDefaultOption(SSLSocket.java:950)
at org.mozilla.jss.ssl.SSLSocket.enableSSL2Default(SSLSocket.java:523)
我查看了 jss4.dll
,并在其中看到了 setSSLDefaultOption
。代码编译得很好,但运行时会抛出此错误。
什么可能会导致这样的事情?
另外,(II)V 是什么意思?
I'm trying to get some NSS code working and I'm getting this error:
java.lang.UnsatisfiedLinkError: org.mozilla.jss.ssl.SSLSocket.setSSLDefaultOption(II)V
at org.mozilla.jss.ssl.SSLSocket.setSSLDefaultOption(Native Method)
at org.mozilla.jss.ssl.SSLSocket.setSSLDefaultOption(SSLSocket.java:950)
at org.mozilla.jss.ssl.SSLSocket.enableSSL2Default(SSLSocket.java:523)
I looked at the jss4.dll
and I see setSSLDefaultOption
within it. The code compiles just fine but it throws this error when it runs.
What might cause something like this?
Also, what does the (II)V mean?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
(IIV) 表示带有两个 int 参数的 void 方法。 V代表虚空。 I 为 int。括号内的是参数的类型。返回类型出现在括号之前。
[编辑] 可以在此处找到此签名表示形式的完整详细信息:http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#14152
无论如何,关于您遇到的链接错误。看来您正在针对该库的一个版本进行编译并针对旧版本运行,其中未定义 setSSLDefaultOption(int,int) 方法。
(IIV) means a void method taking two int parameters. V stands for Void. I for int. What goes inside the parenthesis is the type of the parameters. Return type appears before the parenthesis.
[Edit] Full details of this representation of signatures can be found here: http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#14152
Anyway, regarding the link error that you got. It seems you're compiling against one version of the library and running against an older version, in which the setSSLDefaultOption(int,int) method is not defined.