Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2006

Tip: Looking for answers? Try searching our database.

Loading library inside Jar file

Thread view: 
Marcelo - 22 Jan 2006 22:26 GMT
Hello,

It has been almost all the afternoon trying to load a library from a jar file.
My code is something like

static{       
    //Load the library used by this Wrapper
    //File library = new File("lib/libJavaWrapper.so");       
    //System.load(library.getAbsolutePath());       
    System.load("lib/libJavaWrapper.so");
}

The jar command takes all the directories and subdirectories of my program.
however, whenever I tried to execute the program, I get the

Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library:
/home/marcelo/temp/lib/libJavaWrapper.so

Do you have some ideas?

thanks a lot,

Marcelo

PS: Should I specify this library inside my Manifest file?
Raymond DeCampo - 23 Jan 2006 03:31 GMT
> Hello,
>
[quoted text clipped - 21 lines]
>
> PS: Should I specify this library inside my Manifest file?

It would appear that it order to load a library it must exist on the
file system as a file, not simply be inside a jar file.

Ray

Signature

This signature intentionally left blank.

Andrey Kuznetsov - 23 Jan 2006 08:11 GMT
> It has been almost all the afternoon trying to load a library from a jar
> file.
search for JPackIt

Signature

Andrey Kuznetsov
http://uio.imagero.com Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.