简体   繁体   中英

Eclipse plugin: Copy/Export dependencies

I have a plugin that is in need of some .dll-files. As I debug the Eclipse-Applicatoin and try to load these .dll files I receive a FileNotFoundException since the application does not look inside the project folder but in the actual Eclipse folder it is running in.

So it is not C:\\eclipseworkspace\\myproject\\fileineed.dll it is C:\\eclipse\\fileineed.dll instead.

Of cource I just could copy that .dll there and that's it but I am sure I can tell Eclipse to export these files to the debugging Eclipse.

Does anyone know how?

Please read the paragraph about "Native code and class loaders" at http://www.eclipsezone.com/articles/eclipse-vms/ . That will tell you the most important steps:

  • Put the DLL at the root of the plugin project.
  • Include it in build.properties.
  • Use either System.loadLibrary() or OSGI headers to finally get the DLL loaded at runtime.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM