[vtkusers] VTK+java application for distribution
Simeon Fitch
fitch at datamininglab.com
Tue May 21 08:21:59 EDT 2013
Mahendra,
Out of the box Java does not extract shared libraries out of a JAR file and
load them. There are third party libraries and code samples online that do
this, but to my knowledge VTK hasn't integrated with any of them. Without
such supporting framework, the typical way of handling this is to *not*
include the shared libraries in your JAR file, but have them in a directory
extracted with whatever distribution installer or archive format you use,
and have whatever launcher script/program pass that path to Java with
"-Djava.library.path=...". I think "-Dvtk.lib.dir=..." is supposed to work
too, but I've had less luck with that on windows and the other variable
seems to work on all platforms I've tried.
I've found this link helpful:
http://www.vtk.org/Wiki/VTK/Java_Wrapping
Here's the VTK utility code (template) that supports the loading process.
https://github.com/Kitware/VTK/blob/master/Wrapping/Java/vtk/vtkNativeLibrary.java.in
--
View this message in context: http://vtk.1045678.n5.nabble.com/VTK-java-application-for-distribution-tp5720775p5720796.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list