[vtkusers] Problems in VTK Java & Linux

Denis Barbier bouzim at gmail.com
Fri May 29 02:58:48 EDT 2009


On 2009/5/29 Dhanesh Ramachandram wrote:
> We're trying to port an Eclipse RCP application which uses VTK and ITK
> wrapped as plug-ins from Windows to Linux (Ubuntu 9.04). We've
> completed the initial steps of building the Linux shared libraries of
> VTK and ITK with Java Wrapping enabled. When our application tries to
> access VTK libraries, it seems that there is a problem. We have set
> the appropriate LD_LIBRARY_PATH etc...
> What can be the issue here ?  It seems that in Linux, the shared
> libraries have the prefix 'lib' (ex: "libvtkCommonJava.so") but
> somehow, from the error messages, it seems that the wrapping procedure
> results in code that tries to access the library "vtkCommonJava".
> Could this be the problem ?
[...]

No, "lib" is automatically prepended (and ".so" appended too).
To debug this problem, you can add a static block
  static { System.out.println(System.getProperty("java.library.path")); }
in a class to check java.library.path, maybe this property is modified
when eclipse is launched.
You can also check that
 $ ldd /path/to/libvtkCommonJava.so
does not print any "not found" message.

Denis



More information about the vtkusers mailing list