Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Need help with .jar and .dll
Need help with .jar and .dll [message #897878] Wed, 25 July 2012 07:08 Go to next message
Sebastian Cmentowski is currently offline Sebastian Cmentowski
Messages: 4
Registered: July 2012
Junior Member
Hey,

I am trying to use a .jar libary that needs a .dll file (that uses a dll file
itself) for some Java-Projects,
but for some reason I get an exception every time.

If I add the libary to the build path (referenced libaries),
I get an UnsatisfiedLinkError: no wiiuse.dll in java.library.path exception,
then I have tried the following options, but nothing worked:

1) Add the directory of the two dll files to the native libary tab of the .jar file.
->this leads to an "Cant find dependent libaries" exception (eclipse does not find the second .dll file).
Additionally trying
to add the directory of the dll files to the Systems PATH variable, no effect,
OR trying System.loadLibrary(); for both .dll files , no effect either.

Can you help me?
Re: Need help with .jar and .dll [message #897975 is a reply to message #897878] Wed, 25 July 2012 10:34 Go to previous messageGo to next message
Javin Paul is currently offline Javin Paul
Messages: 45
Registered: July 2011
Location: mumbai
Member

Hi Sebastian,

Did you checked your java.library.path, dll are get picked from here. you can also try running your Java program from command prompt to isolate the problem, I mean if this is only happening in case you are running Java program from eclipse.

try running "java -Djava.library.path= "path to dll"

let us know if it helps.



Re: Need help with .jar and .dll [message #898013 is a reply to message #897975] Wed, 25 July 2012 11:37 Go to previous messageGo to next message
Sebastian Cmentowski is currently offline Sebastian Cmentowski
Messages: 4
Registered: July 2012
Junior Member
I have set the library path correctly,

but for some reason eclipse/java does not find the file anyway.

I hope the images help you.
  • Attachment: screen1.jpg
    (Size: 37.74KB, Downloaded 175 times)
  • Attachment: screen2.jpg
    (Size: 236.66KB, Downloaded 111 times)
Re: Need help with .jar and .dll [message #898021 is a reply to message #898013] Wed, 25 July 2012 11:45 Go to previous messageGo to next message
Javin Paul is currently offline Javin Paul
Messages: 45
Registered: July 2011
Location: mumbai
Member

Did you tried running your Java program as ""java -Djava.library.path= "path to dll"" by passing -Djava.library.path= "path to dll" as VM arguments in Eclipse run configuration ?

Re: Need help with .jar and .dll [message #898022 is a reply to message #898021] Wed, 25 July 2012 11:48 Go to previous messageGo to next message
Sebastian Cmentowski is currently offline Sebastian Cmentowski
Messages: 4
Registered: July 2012
Junior Member
yes exactly. I did this.
Re: Need help with .jar and .dll [message #898027 is a reply to message #898022] Wed, 25 July 2012 12:02 Go to previous messageGo to next message
Sebastian Cmentowski is currently offline Sebastian Cmentowski
Messages: 4
Registered: July 2012
Junior Member
Thank you for your help,
the problem just solved itself.

I just deleted the loadLibary() calls,
which I added yesterday (woth nearly the same configuration???),
and suddenly it worked.

I do not understand it, but anyway, thank you a lot. Smile
Re: Need help with .jar and .dll [message #898903 is a reply to message #898027] Sat, 28 July 2012 23:47 Go to previous message
Javin Paul is currently offline Javin Paul
Messages: 45
Registered: July 2011
Location: mumbai
Member

That happens in computer world Smile

Previous Topic:Problems using gerrit from a client behind proxy
Next Topic:Eclipse on a Tablet
Goto Forum:
  


Current Time: Sat Aug 30 18:24:23 EDT 2014

Powered by FUDForum. Page generated in 0.02686 seconds