How To Install and Compile Xj3D
Xj3D is an example Open Source implementation for the X3D and VRML97 specifications.
This page is intended to help software developers examine and contribute to the source code. This code is under active development, if you are just interested in using the codebase you do not need this document! We have a user install available here. This install includes everything you need to use Xj3D as a Java3D loader and includes a sample VRML97/X3D Browser.
Install the packages to whatever directories you like, but record their locations. We recommend a directory location that will be used in example paths. You will use these locations later to setup your CLASSPATH and PATH environment variables. If a package is mentioned as residing in the lib directory then we suggest you use that version. Some of these are hard to find, tracking at a different version or we have modified them.
CVS is included in the Cygwin distribution. The next steps will take you through downloading the Xj3D code. At this point you have a decision to make. You can either download the latest stable release or jump into the raw development stream. I'd recommend going for the latest stable release, you've got enough to do for now without worring about our untested changes!
Checking out the Code:
cvs loginHit enter for the password.
We have successfully used the latest 1.5.x series as well. We develop against the latest version of the JDK but maintain compatibility against the previous version as well as the current one. So, for example, when JDK 1.6 comes out, we will drop 1.4 support and require a minimum of 1.5.
Note: When installing make sure you select the UNIX shell scripts version of scripts
The 2.0 codebase has not been updated to support the latest Jinput. Its been removed from the compile list for now. You can download it here: https://games-binaries.dev.java.net/build/index.html
These instructions assume you've installed this in c:/javaapis/jinput
make a directory c:/javaapis/joal download platform specific JOAL(Windows would be: joal-windows-1.1b01.zip) to this directory unzip zip. These instructions assume you've installed this in c:/javaapis/joal
The JMF installer will place the files where they are needed.
You'll need a 3.2 version of SWT.
You can download it here: http://www.eclipse.org/swt/
Assuming you downloaded swt-3.2RC7-win32-win32-x86.zip
This comes in the Java3D distribution. I can't find a seperate download of the jar file.
Its also available in Xj3D's CVS from src/eclipse/plugins/javax.vecmath_1.5.0.jar
If you use this version you'll need to change VECMATH_CLASSPATH in the sample bashrc to point to this.
Setup your system like this:
In prior releases we suggested you install these libraries in your lib/ext. We do not recommend that now.
There are some issues with the new Java3D 1.3.2 source versions that we haven't worked through yet.
$userid is your system userid.
All the examples here assume you have installed the Xj3D codebase into "c:/xj3d". Modify these as needed for your local setup.We've created a sample bashrc for you. This includes all the setup information as specified in the above installs. Sample Bash rc You can either make this your .bashrc or "source sample_bashrc" in cygwin to use it.
Make sure the X3D_HOME and X3D_DOS_HOME are correct for your install. Non windows users will need to make some path changes for native libraries.
You will also need to change the JAVA_HOME environment variable. This should point to the location you installed java. So for JDK1.4.2_07 you would use:export JAVA_HOME=c:/jdk1.4.2_07Currently our build scripts do not support spaces in the JAVA_HOME. The default install for JDK5 is in C:/Program Files. You will have to move your JDK location to something like c:/jdk1.5 to use these build scripts.
Building the Xj3D sourceCopy the file
makedirectory into this directory.cp make/Makefile .Now, to compile the code, simply change to this xj3d directory and type:make parsers make config make properties make images make xmlThis will build all of the parser source code using javacc
If you are using the default JOGL renderer type:make ogl
If you are using the Java3D renderer type:make j3d
If you are using the Mobile renderer type:make mobileThe make system provides a number of other options. These are listed below:
class: Build just the class files, no JARs
all: Do everything - JARS and javadoc
javadoc: Generate all of the Javadoc
examples: Compile the example applications
clean: Remove all the compiled library files
nuke: Remove all the binaries and JAR files for both library and examples
Typing justmakeWill provide a complete list of options available, including those for compiling a code for only a specific renderer.
To test that you have the codebase compiling correctly try the following:cd examples/browser javac OGLBrowser.java java OGLBrowser in location append "..\..\parsetest\events\moving_box.wrl" hit the Go! button see box, rejoice!
Last Revised: $Date: 2008/05/16 18:00:08 $