Article View: aus.computers.java
Article #1060JNI --- please help me
From: Duke Biswas
Date: Fri, 13 Aug 1999 00:00
Date: Fri, 13 Aug 1999 00:00
42 lines
1884 bytes
1884 bytes
Hi I am bit new in JNI implementation. But I 've done number of reading from
various different web sites about JNI Specification. But still i am having
"java.lang.UnsatisfiedLinkError: GenerateKeyPair at
testHICDll.main(testHICDll.java:20)"
Exception.
(I am using NT and I have set the Path for dps.dll library which is in
c:\dps directory.)
The code :
~~~~~~~~
public class testHICDll {
native short GenerateKeyPair(String password);
static {
try {
System.loadLibrary("dps");
} catch (UnsatisfiedLinkError e) {
System.err.println("can't find your library");
System.exit(-1);
}
}
public testHICDll() {
}
public static void main(String[] args) {
testHICDll test = new testHICDll();
test.GenerateKeyPair("MNA00002"); // <- it fails in here
}
}
after writing the code, I have taken the following steps
1> run javac testHICDll.java
2> run javah -jni testHICDll - this created testHICDll.h file
3> run java testHICDll
The Dll is written in VC5++ and the function description for GenerateKeyPair
is
short CDPSCtrl::GenerateKeyPair( LPCTSTR lpszPassword)
Technical Details
Message-ID:
<37b36b5c@dnews.tpgi.com.au>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d6db,47fd90278fc9ed0f,start X-Google-Attributes: gid10d6db,public From: "Duke Biswas" <dbiswas@mednet.com.au> Subject: JNI --- please help me Date: 1999/08/13 Message-ID: <37b36b5c@dnews.tpgi.com.au> X-Deja-AN: 512069696 X-Original-NNTP-Posting-Host: 203.57.36.169 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 X-Complaints-To: abuse@telstra.net X-Trace: nsw.nnrp.telstra.net 934505310 203.29.157.4 (Fri, 13 Aug 1999 10:48:30 EST) Organization: Customer of Telstra Big Pond Direct X-MSMail-Priority: Normal NNTP-Posting-Date: Fri, 13 Aug 1999 10:48:30 EST Newsgroups: aus.computers.java