DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2005
    Posts
    2

    Exclamation UnSatisfiedLink error: no sofile in java.library.path

    Hi,

    i've written the folowing program to load a '.so'. I'm working in LINUX.

    public class loadSO
    {
    public static void main(String args[])
    {
    System.loadLibrary("sofile");
    }
    }

    The program give mes the java.lang.UnsatisfiedLink error : no sofile in java.library.path
    If i put a System.out.println(System.getProperty("java.library.path")); i get the value as null.

    I've set LD_LIBRARY_PATH to /usr/lib. No use.
    I tried setting java.library.path System.setProperty("java.library.apth","/usr/lib"); but that doesn't help
    I even tried to put the lib in the same folder as the java file. but that doesn't help either.

    can anyone point out my mistake to me?

  2. #2
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    1,560
    The manner in which a library name is mapped to the actual system library is system dependent.
    The mapping implies that the real name is mapped to something else than "sofie",
    that is for sure, - and/or that the "no found" message is really the result from a
    missing priviledges check.
    I would have had a look at the security management as well
    My unix is rusty but I remember that scenarios like that was quite common in the
    land of solaris.
    eschew obfuscation

  3. #3
    Join Date
    Mar 2005
    Posts
    2

    SO file problem solved

    Hi,

    That problem was solved by a very silly fix.

    Suppose u call System.loadLibrary("loadSO");
    then in the /usr/lib folder ur '.so' file name should be libloadSO.so

    This is reqd on Linux. after u rename the file. the problems are fixed.

    regards,
    Prashant

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links