<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>compiling/running vtk.cvs java1.6 on linux</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>
<P><FONT SIZE=2>Hello vtkusers,<BR>
<BR>
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<BR>
of VTK.<BR>
<BR>
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.<BR>
<BR>
2) After compilation set your CLASSPATH to vtk_install_dir/bin/vtk.jar and to vtk_install_dir/Wrapping/Java<BR>
<BR>
This in theory should be enough but I was getting errors like:<BR>
<BR>
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<BR>
at java.lang.ClassLoader$NativeLibrary.load(Native Method)<BR>
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)<BR>
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)<BR>
at java.lang.Runtime.loadLibrary0(Runtime.java:823)<BR>
at java.lang.System.loadLibrary(System.java:1030)<BR>
at Cone.<clinit>(Cone.java:22)<BR>
<BR>
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<BR>
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. <BR>
<BR>
It would be nice if there was a README.TXT added to .../VTK/Wrapping/Java like the Python Wrapping help file.<BR>
<BR>
cheers,<BR>
<BR>
Henrik</FONT>
</P>
</BODY>
</HTML>