java classpath vtk problem

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

java classpath vtk problem
Hello All

I'm having some issues getting the classpath to work correctly with vtk, I'm using java 1.5.0_05 with Windows XP and a clean build of VTK 4.4.

The ONLY way I can get any vtk java examples to work is the explicitly specify the location of the vtk.jar with the -classpath command line arg like:

java -classpath c:\my_vtk_directory\vti.jar;. Cone

I have added vtk.jar to my CLASSPATH directory, but whenever I run any examples without explicitly specifing the vtk.jar, I get
Exception in thread "main" java.lang.UnsatisfiedLinkError: VTKInit      
        at vtk.vtkConeSource.VTKInit(Native Method)                    

I've also tried to load the vtk.jar programatically be setting the System.setProperty("java.class.path", "path to vtk.jar");, but this also just results in the same unsatisfied link error.

Has anyone ever sucessfully used vtk without using the -classpath command line switch? The reason I ask is that I trying to develop an application using vtk, but  an external program actually initialized the java environment and I do not have much control over the actuall command line parameters, so I would really like to get vtk working by just being able to stick the vtk.jar in my classpath.

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