When I call a vb dll from java,the following exception came java.lang.Unsatisfiedlinkerror came what may do
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ganesh_Kumar
Posted On:   Thursday, June 20, 2002 07:19 AM

I use jdk1.2.2 I have one class called demo package gjava; import java.io.*; import java.util.*; public class demo { int i; int a; public static void main(String args[])throws Exception { demo ob = new demo(); ob.i=10; System.out.println(" The value of ob.i before native"+ob.i); try{ ob.increment(); }catch(Exception e2) {System.out.println(" Thrown Exception is "+e2);} System.out.println(" The value of ob.i after native&   More>>


I use jdk1.2.2
I have one class called demo



package gjava;

import java.io.*;

import java.util.*;

public class demo

{

int i;

int a;

public static void main(String args[])throws Exception

{

demo ob = new demo();

ob.i=10;

System.out.println("
The value of ob.i before native"+ob.i);

try{

ob.increment();

}catch(Exception e2)

{System.out.println(" Thrown Exception is "+e2);}

System.out.println("
The value of ob.i after native"+ob.i);

//System.out.println("
The value of a ="+ob.a);

}

public native int increment();

static

{

System.loadLibrary("c:/jdk1.2.2/bin/gjava/cmpIncrement.dll");

}

}


The .dll has only one method which returns an integer

There is no inclusion of jni in the vb class

I have created the demo.h successfully

when I run the code by using the command java demo the following error came Exception in thread main java.lang.UnsatisfiedLinkError no c:/jdk1.2.2/bin/gjava/cmpIncrement.dll in java. library.path


what I have to do to run or tell someother way

   <<Less
About | Sitemap | Contact