- Install JDK and JRE from ports or package
- Install Java3d from ports/packages
- Set CLASS_PATH and LD_LIBRARY_PATH in your $HOME/.bashrc or $HOME/.cshrc
You can fetch the source/package here:
http://www.FreeBSDFoundation.org/downloads/java.shtml
cd $PORTS_DIR/java/diablo-jdk15; make install clean
cd $PORTS_DIR/java/diablo-jre15; make install clean
or use pkg_add(1)
cd $PORTS_DIR/java/java3d; make install clean
(in csh/tcsh, you should use setenv instead of export, for example:
setenv VARIABLE value, ie.: setenv CLASSPATH /usr/local/diablo-jdk15/lib/tools.jar)
following is example of my .bashrc:
export JDK_PKG_NAME=diablo-jdk1.5.0
export JRE_PKG_NAME=diablo-jre1.5.0
export JAVA_HOME=/usr/local/${JDK_PKG_NAME}/
export JRE_HOME=/usr/local/${JRE_PKG_NAME}/
export CLASSPATH=/usr/local/${JDK_PKG_NAME}/lib/tools.jar:\
/usr/local/share/java/classes/:\
/usr/local/share/java/java3d/jar/:./
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:\
/usr/local/share/java/java3d/lib/:\
/usr/local/${JDK_PKG_NAME}/jre/lib/i386/xawt
II. Testing
go http://www.java3d.org for testing!
沒有留言:
張貼留言