File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes How load library in jar file? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "How load library in jar file?" Watch "How load library in jar file?" New topic
Author

How load library in jar file?

Robert Paris
Ranch Hand

Joined: Jul 28, 2002
Posts: 585
I have a native method for a C program i wrote. I want to package the whole thing into a jar executable. However, when I do that, it can no longer find the library. It always throws an ubnsatisfied link exception. I tried adding ".;jarfile.jar" to the library path with System.setProperty but it still couldn't find it. Does anyone know how I can do this?
Robert Paris
Ranch Hand

Joined: Jul 28, 2002
Posts: 585
Apparently there's no standardized way of doing this. So I just read the file in as a resourcestream (from the jar file), figured out what folder I was in and created the dll file there.
 
IntelliJ Java IDE
 
subject: How load library in jar file?
 
Threads others viewed
javax.servlet.jsp does not exist? error
Hot deploy for WebLogic 5.1
Using custom Exceptions within a Session Bean
Making JAR Libraries in WSAD 5.1
Gwt Gdata using OAuth
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture