vtk application deployment


I successfully wrote a java application with vtk on my development machine. I generated an executable jar file with netbeans which works nicely in different locations of C: drive (with different dll path and vtk.jar classpath). Now I would like to test this jar on a different machine where vtk is not installed. To do this I provide the jar of my application, the vtk.jar file as well as all dll files contained in my vtk installation folder.

On the target machine the application fails to load vtk libraries, even if path is correctly set.

Both machines are under windows 10 64bits with java 1.8. I am really stuck with this problem.

Thank you :slight_smile:

edit: vtk has been built with shared libs on and in release mode


I think I finally managed to make it work. I guess I had chaos in my environment variables. If this can help others here are the steps I followed:

  • cmake vtk in release configuration, shared libs on with vtk_wrap_java activated but without vtk_java_install
  • build vtk with visual studio 2017
  • added bin directory of vtk installation folder to path
  • java/vtk application using netbeans ide with vtk.jar library => directory containing appli.jar + lib subdirectory containing vtk.jar
  • added a bin folder subdirectory to the previous folder where I copied all vtk dll
  • copying the last folder to another computer without vtk installed worked

Thanks for posting.
I expect you’ve made the next person down the line’s life a bit easier.