[vtkusers] java Exception with vtk

Frederic DANESI frederic.danesi at dinccs.com
Thu Feb 21 07:05:13 EST 2008


In fact, while producing the dll files, vtkCommon and vtkCommonJava are
linked to awt.dll and jawt.dll 
 that’s why you get an unsatisfied link
An easy way to overcome this in to copy / past “awt.dll” and “jawt.dll” from
your JRE\bin or JDK\bin installation in the same directory as your VTK dlls


Département DINCCS (Département Ingénierie Numérique, Conception
Collaborative et Simulation) 
Pole de Haute Technologie, 7 boulevard Jean Delautre (IFTS) 
08000 Charleville-Mézières 
Tel. : / 
Email : frederic.danesi at dinccs.com 
Web: www.afmicado.com / www.dinccs.com

De : vtkusers-bounces+frederic.danesi=dinccs.com at vtk.org
[mailto:vtkusers-bounces+frederic.danesi=dinccs.com at vtk.org] De la part de
Eric E. Monson
Envoyé : jeudi 21 février 2008 12:51
À : wells
Cc : vtkusers at vtk.org
Objet : Re: [vtkusers] java Exception with vtk


I don't know for sure if this is the problem, but to get VTK Java to work I
have to set these two environment variables (either on the command line or
in my .profile for the bash shell):

export CLASSPATH=/Users/emonson/Programming/VTK/build/bin/vtk.jar:.
export JAVA_LIBRARY_PATH=/Users/emonson/Programming/VTK/build/bin

of course, with you own paths to vtk.jar and the VTK/build/bin directories.
Notice the first one includes looking in the current directory with the
colon separator and the full stop (period).


On Feb 21, 2008, at 4:19 AM, wells wrote:

I ran a single java program, and throw an exception. like following:

DanyLeeMacbook-4:dist wells$ java -jar vtkSample.jar
Exception in thread "main" java.lang.UnsatisfiedLinkError: no vtkCommonJava
in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1753)
	at java.lang.Runtime.loadLibrary0(Runtime.java:823)
	at java.lang.System.loadLibrary(System.java:1030)
	at vtk.vtkPanel.<clinit>(vtkPanel.java:26)
	at vtksample.VTKSample.main(VTKSample.java:32)

then I and path into java.library.path ,like following:

DanyLeeMacbook-4:dist wells$ java -D
:/usr/lib/java:/Users/wells/vJavaBin/lib/Extensions" -jar vtkSample.jar
Exception in thread "main" java.lang.NoClassDefFoundError:
Caused by: java.lang.ClassNotFoundException:
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:288)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)

There are dylibs in "/Users/wells/vJavaBin/lib/Extensions" .

Can any one help me! Thanks !


This is the private VTK discussion list.Please keep messages on-topic. Check
the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:

More information about the vtkusers mailing list