<div dir="ltr">1) Yes, just make sure you load all the needed libraries.<div><br></div><div>2) Modules create libraries and each module describe its dependencies (look at the files named: module.cmake) </div><div>For each class from VTK you use find the module it belongs to and keep track of each dependencies. From that you should be able to create a list of library that you need. </div><div><br></div><div>There might be an "automatic/better" way using CMake but I'm not aware of it. But I kind of recall some talk a long time ago (years) on the mailing list on how to build a VTK application without CMake and how to know which library you need to link against. Dave Cole and Bill Lorensen may have contributed to that topic as well as Marcus Hanwell. But that is just a memory that might be good to look into. (You may have to fake a C++ file to describe the dependencies.) </div><div><br></div><div>3) Might be lighter in memory. In case you only need half of VTK, your application can only embed those libs and be smaller on disk (and memory).</div><div><br></div><div>Seb</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 31, 2015 at 11:47 AM, CSharpdotcom . <span dir="ltr"><<a href="mailto:csharpdotcom@gmail.com" target="_blank">csharpdotcom@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I've just been trying another Java example of VTK, as listed in<br>
<a href="http://www.vtk.org/Wiki/VTK/Examples/Java/Cylinder" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Java/Cylinder</a>, which I put into<br>
NetBeans.  When I use the code in the static block:<br>
<br>
static {<br>
    System.loadLibrary("vtkCommonCoreJava");<br>
    System.loadLibrary("vtkFiltersSourcesJava");<br>
    System.loadLibrary("vtkInteractionStyleJava");<br>
    System.loadLibrary("vtkRenderingOpenGLJava");<br>
  }<br>
<br>
as given in the listing, the application fails with the error message:<br>
<br>
Exception in thread "main" java.lang.UnsatisfiedLinkError:<br>
vtk.vtkPolyDataMapper.VTKInit()J<br>
..........<br>
<br>
and I found that VTKInit() is called right at the very end of the<br>
vtkPolyData class in vtk.jar.  However, if I replace loading the<br>
specified libraries in the static block above by loading all the<br>
libraries using:<br>
<br>
static {<br>
    if (!vtkNativeLibrary.LoadAllNativeLibraries()) {<br>
        for (vtkNativeLibrary lib : vtkNativeLibrary.values()) {<br>
            if (!lib.IsLoaded())<br>
              System.out.println(lib.GetLibraryName() + " not loaded");<br>
        }<br>
        System.out.println("Make sure the search path is correct: ");<br>
        System.out.println(System.getProperty("java.library.path"));<br>
    }<br>
    vtkNativeLibrary.DisableOutputWindow(null);<br>
}<br>
<br>
as copied from the code I got working last week, then the application<br>
works correctly.<br>
<br>
My questions are:<br>
<br>
1) Is there a way of fixing the error without loading all the libraries?<br>
<br>
2) Related to that, is there a way of determining which libraries to<br>
load, without having to load them all?<br>
<br>
3) Is it better to load only the libraries you need rather than<br>
loading them all?  This of course will depend on knowing which<br>
libraries to load from (2).<br>
<br>
At your convenience I would be grateful to have some help on this.<br>
<br>
Christopher Sharp<br>
</blockquote></div><br></div>