Results 1 to 2 of 2
  1. #1
    goraj is offline Member
    Join Date
    Aug 2013
    Posts
    1
    Rep Power
    0

    Unhappy Exception in thread "main" java.lang.UnsatisfiedLinkError + Native Library Loading

    Hi,

    public class SmartEMVJNI
    {
    static final String SALE = "1";
    static final int REQUEST_LENGTH = 50;
    static final int AMOUNT_LENGTH = 12;
    static final int TRANS_TYPE_LENGTH = 1;
    static final int CASH_BACK_LENGTH = 12;
    public native String GetVersion ();
    public native Object [] GetSwipeMagneticCardResultAuto (char [] para);
    static
    {
    System.loadLibrary("smartPayment");
    }

    public static void main(String[] args)
    {
    Object[] result = null;
    result = callSmartCardJNI();
    }

    public static Object[] callSmartCardJNI()
    {
    Object[] data = null;
    String cardAmount = "10000";
    char[] amount = null;
    SmartEMVJNI jniInstance = new SmartEMVJNI();
    amount = cardAmount.toCharArray();
    char[] request = new char[50];
    char[] transactionType = SALE.toCharArray();
    System.arraycopy(amount, 0, request, 0,
    amount.length);
    System.arraycopy(transactionType, 0, request,
    AMOUNT_LENGTH+CASH_BACK_LENGTH,
    transactionType.length);
    data = jniInstance.GetSwipeMagneticCardResultAuto(request );
    return data;
    }
    }


    The Above Code is the Simple code to load the DLL file and Call the Method GetSwipeMagneticCardResultAuto() written in the DLL.
    When i am executing this Code, am getting below Exception.

    """Exception in thread "main" java.lang.UnsatisfiedLinkError: GetSwipeMagneticCardResultAuto
    at SmartEMVJNI.GetSwipeMagneticCardResultAuto(Native Method)
    at SmartEMVJNI.callSmartCardJNI(SmartEMVJNI.java:78)
    at SmartEMVJNI.main(SmartEMVJNI.java:54)"""

    Note:- i have placed "smartPayment.dll" in the System32 Folder and i registered in the system.

    Please help me to resolve this.

    Thanks!

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,422
    Rep Power
    20

    Default Re: Exception in thread "main" java.lang.UnsatisfiedLinkError + Native Library Loadin

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 0
    Last Post: 04-30-2013, 09:43 AM
  2. Replies: 5
    Last Post: 12-21-2011, 07:44 PM
  3. Replies: 5
    Last Post: 06-22-2010, 04:51 PM
  4. Replies: 8
    Last Post: 02-23-2010, 01:22 PM
  5. Replies: 3
    Last Post: 02-22-2010, 08:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •