I am trying to access a legacy dll from a java user module in ND 4.1.3.8 and having 
trouble getting it to work.
Currently, I am using the System.loadLibrary( ) to statically load the dll into the 
module. I had to play 
around with qualifying the path, using the '/' to finally get the module to compile 
and giving the full path
name with no file type extension. When I went to that form, my error message changed 
from 
'NoClassDefFoundError' to 'UnsatisfiedLinkError'. From that I am inferring that I am 
now successfully
loading the dll but not referencing the methods correctly for some reason. I've also 
wrapped the native
method in a differently named calling method for ease of use - but this shouldn't pose 
a problem.

Code sample:

package pkg;

public class dllLinkObject {

   static {
               System.loadLibrary("/path/file_loaded");
   }

   native int Foo(String inString, String outString, String reString, int outLength, 
int flags);

   public string jniLinkFoo(String instring) {
          String outString = new String("***");
          String refString  = new String("***");
          int outLength = 20;
          int flags = 1;

          Foo(instring, outString, reString, outLength, flags);

          return outString;
     }

}

The UnsatisfiedLinkError appears to come from the native declaration. I've 
already changed the java options in my studio, removing the -g debug option.

Thanks,
CJ



_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to