Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: UnsatisfiedLinkError

  1. #1
    Junior Member
    Join Date
    Jan 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default UnsatisfiedLinkError

    Hi All

    Hi All,

    I am trying to use one of the jar files. The porgram compiles fine but when I try to run the program it gives me this error. I have put the jar file into the class path. I have put the location of dierctory containing the jar file into path but still its not working. Can anyone suggest what can be the cause of the problem?

    Exception in thread "main" java.lang.UnsatisfiedLinkError: no jxi in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java :1709)
    at java.lang.Runtime.loadLibrary0(Runtime.java:823)
    at java.lang.System.loadLibrary(System.java:1030)
    at ukbpa.Xi.XiProxy.<clinit>(XiProxy.java:11)
    at ukbpa.Xi.XiFunctions.<clinit>(XiFunctions.java:10)
    at ScratchPad.main(ScratchPad.java:34)


  2. #2
    Member goldest's Avatar
    Join Date
    Oct 2009
    Location
    Pune, India
    Posts
    63
    Thanks
    1
    Thanked 12 Times in 10 Posts

    Wink Re: UnsatisfiedLinkError

    Hey leepan2008,

    Seems like the issue is that you are using some native methods in your program and the native libraries are missing from the path.

    Here is what java docs says about UnsatisfiedLinkError : "Thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native"

    Here is one link from sun about the native method usages and properties to be set: Sun Native Methods

    In case if you want to print what your java library path is, you can do it using following:
    public void getSystemProperty() {
    String path = System.getProperty("java.library.path");
    System.out.println(path);
    }
    Hope that helps you to sort out the issue.

    Goldest
    Java Is A Funny Language... Really!

    Sun: Java Coding Conventions

    Click on THANKS if you like the solution provided.
    Click on Star if you are really impressed with the solution.

Similar Threads

  1. [SOLVED] UnsatisfiedLinkError
    By tecno40 in forum Java Native Interface
    Replies: 5
    Last Post: June 12th, 2011, 03:08 AM
  2. java.lang.UnsatisfiedLinkError
    By H P in forum Java Native Interface
    Replies: 3
    Last Post: January 28th, 2010, 05:04 AM