[vtk-developers] Java wrapping

Csaba Vörös voroscsaba.kanizsa at gmail.com
Sat Apr 8 19:37:49 EDT 2017


Dear VTK Developers!

I am a BsC student and now I'm writing my degree thesis. I programming in
Java and I would use the vtk for the visualize my 3D model. I use MacOS
10.12.2 (Sierra).
I downloaded from the web the latest version of VTK and I followed the
instruction of vtk wiki. I configured the building with CMake and I used
make command to compiling. After that I installed the vtk with make install
command. In the terminal appeared the /usr/local/lib folder with the
vtk.jar and .dylib files.
At the CMake step I signed over the default ON variables the VTK_WRAP_JAVA,
VTK_JAVA_INSTALL, VTK_JAVA_CLEANUP_INSTALL fields. I added the following
variables to CMake correspond to VTK wiki and signed ON: DVTK_USE_QVTK,
DVTK_USE_CARBON, DVTK_USE_GUISUPPORT and DCMAKE_INSTALL_PREFIX=/usr/local.

I use NetBeans development environment and I setted up the vtk.jar to the
Libraries and I added the following Virtual Machine options:
-Djava.library.path="/usr/local/natives-Darwin-x86_64"

When I would run a a simple code thrown the following exception:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no vtkCommonJava
in java.library.path

The source code contain this:
 static {
    System.loadLibrary("vtkCommonJava");
    System.loadLibrary("vtkFilteringJava");
    System.loadLibrary("vtkIOJava");
    System.loadLibrary("vtkImagingJava");
    System.loadLibrary("vtkGraphicsJava");
    System.loadLibrary("vtkRenderingJava");
  }

I have no idea what is the solution for this problem.

Thank you for taking the time to read my letter.

Csaba Vörös
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20170409/6b43c724/attachment.html>


More information about the vtk-developers mailing list