Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Proper method for specifying loading of native libraries
Proper method for specifying loading of native libraries [message #1083132] Fri, 09 August 2013 14:13
Ric Wright is currently offline Ric WrightFriend
Messages: 70
Registered: July 2009
Member
I have very simple little Eclipse plugin that uses vtk (vtk.org) to
provide visualization in 3D. I created the world's simplest plugin with
one view to show a single VTK widget. THe VTK libraries are two-part,
a jar (vtk.jar) which is little more than a manifest and wrapper for
the native libraries. I have wrapped it in a plugin using the normal
Eclipse wizard (create plugin from Jar). I did NOT unpack the jar.
Then the view plugin includes the vtk.jar plugin as a dependency. THe
vtk.jar is included as a jar on the library tab of the buid properties
for the vtk.jar plugin.

This all works fine. BUT there is one weird gotcha. I set the "native
library location" to point at the folder where the native libraries
(dylib and jnilibs) are actually located. And Eclipse fails to load
the libraries and I get unstatisfied link errors and the view won't
load (naturally). However, if I go into the launch configuration and
add the program argument:

-Djava.library.path=/Volumes/Swift/dev/VTK/VTK-build/lib

which points to EXACTLY the same place as I set the native library
location, then the libraries get loaded and it works fine. Obviously,
I can live with setting this program argument, but it seems weird that
setting the native library location doesn't work. Shouldn't it? What
is the correct way to do this (if there is one)?

TIA, Ric

(BTW, if anyone is curious, the source for this is here:
https://github.com/rkwright/vtkview)
Previous Topic:how to call java method in jsp
Next Topic:EasyEclipse Swing
Goto Forum:
  


Current Time: Fri Apr 26 17:17:48 GMT 2024

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

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

Back to the top