Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to add a dll to a jar

807603Nov 29 2007 — edited Dec 3 2007
Hi! Everyone.
I have a jar which contains a few classes and a dll file which one of my class uses. When I run my java class, it throws the following Exception.

Exception in thread "main" java.lang.UnsatisfiedLinkError: no WinSpecific in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at WinSpecific.<clinit>(WinSpecific.java:6)
at Specific.<init>(Specific.java:10)
at Specific.main(Specific.java:30)

(WinSpecific is the name of the dll)

If my jar and dll both are in the same folder and the dll file in an extracted form then there is no problem, the class would run. But I want the dll to be inside the jar.

Please help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 31 2007
Added on Nov 29 2007
5 comments
102 views