[vtk-developers] Java wrapping

Sebastien Jourdain sebastien.jourdain at kitware.com
Sat Apr 8 20:01:54 EDT 2017


Hi Csaba,

I'm hoping that /usr/local was empty as the VTK_JAVA_CLEANUP_INSTALL
property will wipe that directory before packaging the jars and so on.
Usually, when using VTK_JAVA_CLEANUP_INSTALL a local dedicated directory is
set to CMAKE_INSTALL_PREFIX. Then you can copy its content anywhere else.

Regarding your issue I believe that you have all library names. Instead you
should be using the helper enum vtkNativeLibrary. Which can be used like in
our Demo example here:
https://github.com/Kitware/VTK/blob/master/Wrapping/Java/vtk/sample/Demo.java#L51-L61

Seb

On Sat, Apr 8, 2017 at 5:37 PM, Csaba Vörös <voroscsaba.kanizsa at gmail.com>
wrote:

> 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
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20170408/6e748c14/attachment.html>


More information about the vtk-developers mailing list