Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

( JNI ) java.lang.UnsatisfiedLinkError

Status
Not open for further replies.

eric91850

Programmer
Jul 29, 2007
12
US
I have 1 DLL file need to call from Java, but when I run the Java app, I got the following error

Exception in thread "main" java.lang.UnsatisfiedLinkError: isBluetoothAvailable
at Test1.isBluetoothAvailable(Native Method)
at Test1.main(Test1.java:11)

=============
Here the java app

Here the C++ DLL file

Here the C++ header file

Here the C++ code example how to use DLL
 
I didn't do much with JNI, but if I remember right, you call i.e.:
Code:
        static
        {
                try
                {
                        System.loadLibrary ("Xy");
                }
                catch (UnsatisfiedLinkError usle)
                {
                        usle.printStackTrace ();
                }
        }
On my platform, this will be libXy.so, which is searched, on your platform it should be Xy.dll or LibXy.dll - I guess the first is right, but the suffix is appended from the jvm.

The path for the library is specified by LD_LIBRARY_PATH on my system - perhaps C:/Windows/system32 is the easiest location to make it found.

Your code leads to "C:/ICubeXLib.dll.dll" beeing searched in C:/Windows/system32 or something like that.



don't visit my homepage:
 
Another posibility is that the dll doesn't contain that method with that exact signature.

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top