[vtkusers] compiling/running vtk.cvs java1.6 on linux

Henrik Westerberg henrik.westerberg at crg.es
Fri Aug 10 07:24:40 EDT 2007


Hello vtkusers,

I just went through the process of compiling vtk with java support for linux and would like to write down a few tips using the CVS version
of VTK.

1) Firstly before running ccmake make sure your JAVA_HOME variable is set to where ever java is installed as this saves a lot of time. 

2) After compilation set your CLASSPATH to vtk_install_dir/bin/vtk.jar and to vtk_install_dir/Wrapping/Java

This in theory should be enough but I was getting errors like:

Exception in thread "main" java.lang.UnsatisfiedLinkError: .../VTK/bin/libvtkRenderingJava.so.5.1.0: libmawt.so: cannot open shared object file: No such file or directory
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
        at java.lang.Runtime.loadLibrary0(Runtime.java:823)
        at java.lang.System.loadLibrary(System.java:1030)
        at Cone.<clinit>(Cone.java:22)

when running Cone.java. I found two fixes to this; to add libmawt.so to my LD_LIBRARY_PATH or more simply I copied the library into the directory
above. For some reason .../jdk1.6.0_02/jre/lib/i386/xawt is not being picked up by java but .../jdk1.6.0_02/jre/lib/i386/ is.  

It would be nice if there was a README.TXT added to .../VTK/Wrapping/Java like the Python Wrapping help file.
 
cheers,

Henrik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070810/c148b2f0/attachment.htm>


More information about the vtkusers mailing list