VTK/Tutorials/JavaEnvironmentSetup: Difference between revisions
From KitwarePublic
Jump to navigationJump to search
Daviddoria (talk | contribs) No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
(Throughout the following we will assume it is installed in /opt/java, though you can install it wherever you please) | (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/jre/lib/i386 and /opt/java/jre/lib/i386/xawt to LD_LIBRARY_PATH as well as the VTK libraries (in ~/.bashrc) | ||
* Add /opt/java/bin to your PATH | * Add /opt/java/bin to your PATH | ||
Line 8: | Line 8: | ||
* In your ~/.bashrc, add | * In your ~/.bashrc, add | ||
export JAVA_HOME=/opt/java | export JAVA_HOME=/opt/java | ||
* You can now run VTK Java scripts as follows: | * You can now run VTK Java scripts as follows: | ||
javac | javac -cp ".:/home/doriad/bin/VTK/bin/vtk.jar" ClassName.java | ||
java ClassName | java -cp ".:/home/doriad/bin/VTK/bin/vtk.jar" ClassName |
Revision as of 16:22, 18 May 2010
- Download and install the sun JDK: http://java.sun.com/javase/downloads/widget/jdk6.jsp
(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 as well as the VTK libraries (in ~/.bashrc)
- Add /opt/java/bin to your PATH
- In your ~/.bashrc, add
export JAVA_HOME=/opt/java
- You can now run VTK Java scripts as follows:
javac -cp ".:/home/doriad/bin/VTK/bin/vtk.jar" ClassName.java java -cp ".:/home/doriad/bin/VTK/bin/vtk.jar" ClassName