VTK/Tutorials/JavaEnvironmentSetup

From KitwarePublic
< VTK‎ | Tutorials
Revision as of 15:26, 18 May 2010 by Daviddoria (talk | contribs)
Jump to navigationJump to search

(Throughout the following we will assume it is installed in /opt/java, though you can install it wherever you please)

  • Add /opt/java/jre/lib/i386 and /opt/java/jre/lib/i386/xawt to LD_LIBRARY_PATH (in ~/.bashrc)
  • Add /opt/java/bin to your PATH
  • In your ~/.bashrc, add
export JAVA_HOME=/opt/java
export JAVA_INCLUDE_PATH=/opt/java/include
export JAVA_INCLUDE_PATH2=/opt/java/include/linux
export CLASSPATH=$CLASSPATH:.:/home/doriad/bin/VTK/bin/vtk.jar # note: having '.' on CLASSPATH is very important!
  • You can now run VTK Java scripts as follows:
javac script.java
java ClassName