[vtkusers] java Exception with vtk
Frederic DANESI
frederic.danesi at dinccs.com
Thu Feb 21 07:05:13 EST 2008
Hi,
In fact, while producing the dll files, vtkCommon and vtkCommonJava are
linked to awt.dll and jawt.dll
thats why you get an unsatisfied link
error.
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
(=/Users/emonson/Programming/VTK/build/bin)
Fred.
Cordialement,
F.Danesi
--
Département DINCCS (Département Ingénierie Numérique, Conception
Collaborative et Simulation)
MICADO / DINCCS
Pole de Haute Technologie, 7 boulevard Jean Delautre (IFTS)
08000 Charleville-Mézières
Tel. : 03.24.41.69.55 / 06.62.76.13.32
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
Hey,
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).
-Eric
On Feb 21, 2008, at 4:19 AM, wells wrote:
hi
I ran a single java program, and throw an exception. like following:
DanyLeeMacbook-4:dist wells$ java -jar vtkSample.jar
java.library.path:.:/Library/Java/Extensions:/System/Library/Java/Extensions
:/usr/lib/java
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
java.library.path=":/Library/Java/Extensions:/System/Library/Java/Extensions
:/usr/lib/java:/Users/wells/vJavaBin/lib/Extensions" -jar vtkSample.jar
Exception in thread "main" java.lang.NoClassDefFoundError:
java/library/path=:/Library/Java/Extensions:/System/Library/Java/Extensions:
/usr/lib/java:/Users/wells/vJavaBin/lib/Extensions
Caused by: java.lang.ClassNotFoundException:
java.library.path=:.Library.Java.Extensions:.System.Library.Java.Extensions:
.usr.lib.java:.Users.wells.vJavaBin.lib.Extensions
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 !
-wells
_______________________________________________
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:
http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list