[vtkusers] UnsatisfiedLinkError with Java/VTK

Ben Sutherland ben at isc.tamu.edu
Thu Feb 28 15:40:55 EST 2008


In openSUSE 10.3, when I try to run my project (hsnbrg), I get the  
following error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no  
vtkCommonJava in java.library.path
         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
         at java.lang.Runtime.loadLibrary0(Runtime.java:822)
         at java.lang.System.loadLibrary(System.java:993)
         at hsnbrg.<clinit>(hsnbrg.java:12)

The command I use to try to run this is:
java -classpath /<vtk_install_loc>/lib/:/<vtk_install_loc>/bin/:. hsnbrg

The system's PATH includes /<vtk_install_loc>/bin/

The relevant code is:

import vtk.*;

public class hsnbrg {

     static {
	System.loadLibrary("vtkCommonJava");
	System.loadLibrary("vtkCommonJava");
	System.loadLibrary("vtkFilteringJava");
	System.loadLibrary("vtkIOJava");
	System.loadLibrary("vtkImagingJava");
	System.loadLibrary("vtkGraphicsJava");
	System.loadLibrary("vtkRenderingJava");
	}
...<code>
}

vtk.jar is installed in /<vtk_install_loc>/lib/, with a symlink in / 
usr/lib64/jvm/java/jre/lib/ext/


Any suggestions or help would be appreciated.

Thanks,
Ben






More information about the vtkusers mailing list