tags:

views:

75

answers:

1

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?

+1  A: 

(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%5Fedition/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.

Itay