Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Basic case of DLL import failing
Basic case of DLL import failing [message #333187] Fri, 28 November 2008 13:56 Go to next message
Eclipse UserFriend
Originally posted by: torbjorn.ghostwriter.no

I've done what I thought were the necessary steps to access a DLL in a
plugin:

1. I put the dll file (jdic_misc.dll) in the plugin root
2. I put the following code in the plugin:

System.loadLibrary("jdic_misc.dll");

However, the line throws the following exception:

java.lang.UnsatisfiedLinkError: no jdic_misc.dll in java.library.path

.... which I interpret as not being able to find the DLL at all, rather than
an issue with further linking.

Have I missed some steps? I read that the Bundle-NativeInclude (or whatever
it was called) is unnecessary in 3.4, and I tried including the DLL in the
build, but nothing helps. Note that I'm running this from Eclipse directly
(i.e. not exported or anything like that)
Re: Basic case of DLL import failing [message #333190 is a reply to message #333187] Fri, 28 November 2008 15:25 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Torbjørn G. Dahle wrote:
> Have I missed some steps? I read that the Bundle-NativeInclude (or whatever
> it was called) is unnecessary in 3.4, and I tried including the DLL in the
> build, but nothing helps. Note that I'm running this from Eclipse directly
> (i.e. not exported or anything like that)

Here's one example.
http://litrik.blogspot.com/2007/08/secrets-of-bundle-nativec ode.html

Could you provide a link to where you were reading that
Bundle-NativeCode is not necessary? I don't believe that's the case (in
OSGi and bundles, you do need it).

SWT doesn't require java.library.path any more, even when run as an SWT
java app, but that's because they have extra code that extracts their
native libraries to a temporary location if they are not already available.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Previous Topic:completion does not work, why?
Next Topic:Learning Eclipse: If you knew then what you knew now....
Goto Forum:
  


Current Time: Tue Apr 16 11:41:47 GMT 2024

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

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

Back to the top