Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Export dll
Export dll [message #481482] Fri, 21 August 2009 08:15 Go to next message
T. Wilhelm is currently offline T. WilhelmFriend
Messages: 129
Registered: July 2009
Senior Member
hey all,

i have a RCP application and want to call a C library (myLib.dll) from
eclipse via JNA (Note that this JNA and not JNI).

I have my library at "c:\myLibraries" everything works fine when i add the
VM argument "-Djna.library.path=c:\myLibraries"

The problem is that i dont wanna have an absolute path in the parameters.
Can somebody tell me how i can export my .dll to the Main application
folder (The folder where also my .exe file is) and do the correct path
settings then?

Thanks alot
Thomas
Re: Export dll [message #481484 is a reply to message #481482] Fri, 21 August 2009 08:30 Go to previous messageGo to next message
T. Wilhelm is currently offline T. WilhelmFriend
Messages: 129
Registered: July 2009
Senior Member
Ok i think i found a solution, just had to copy the dll to my root folder.

I found a post here where they said that exporting files to the root
folder only works when my product is based on features, is this correct?
or is there another way?

Thanks alot
Re: Export dll [message #481950 is a reply to message #481482] Mon, 24 August 2009 19:45 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
You can use a Bundle-NativeCode header in your manifest and OSGi will
take care of the library automatically and you don't need to worry about
the library path.

http://litrik.blogspot.com/2007/08/secrets-of-bundle-nativec ode.html

(There are a few bugs in the export/headless build around
Bundle-NativeCode, so you should also specify an Eclipse-PlatformFilter
attribute).

-Andrew



T. Wilhelm wrote:
> hey all,
>
> i have a RCP application and want to call a C library (myLib.dll) from
> eclipse via JNA (Note that this JNA and not JNI).
>
> I have my library at "c:\myLibraries" everything works fine when i add
> the VM argument "-Djna.library.path=c:\myLibraries"
>
> The problem is that i dont wanna have an absolute path in the
> parameters. Can somebody tell me how i can export my .dll to the Main
> application folder (The folder where also my .exe file is) and do the
> correct path settings then?
>
> Thanks alot
> Thomas
>
Previous Topic:Plugin dependencies, product file, run cfg, pde build?
Next Topic:Display a image
Goto Forum:
  


Current Time: Thu Apr 25 14:02:22 GMT 2024

Powered by FUDForum. Page generated in 0.03570 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top