<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title>README-build: build instructions for the j3d-core project</title> </head> <body> <h3><span style="font-weight: bold; text-decoration: underline;">Building the 3D packages</span></h3> <p><span style="text-decoration: underline;"><span style="font-weight: bold;"></span></span><span style="font-weight: bold; text-decoration: underline;"> </span></p> <p>To build the 3D packages, you must checkout the following three svn repositories:<br> </p> <ul> <li><a href="http://j3d-core.dev.java.net/">j3d-core</a></li> <li><a href="http://j3d-core-utils.dev.java.net/">j3d-core-utils</a></li> <li><a href="http://vecmath.dev.java.net/">vecmath</a></li> </ul> <p>These three top-level directories must be named exactly as shown above and they must be sibling directories. To ensure this, run the svn checkout command for each of the respositories from the same parent directory. For example:<br> </p> <ul> <code>cd <j3d-root-dir></code><br> <code>svn checkout https://vecmath.dev.java.net/svn/vecmath/branches/dev-1_6 vecmath</code><br> <code>svn checkout https://j3d-core.dev.java.net/svn/j3d-core/branches/dev-1_6 j3d-core</code><br> <code>svn checkout https://j3d-core-utils.dev.java.net/svn/j3d-core-utils/branches/dev-1_6 j3d-core-utils</code> </ul> <p>NOTE: you must first build the javax.vecmath package before building the javax.media.j3d and com.sun.j3d.* packages. See the <a href="../vecmath/README-build.html">README-build.html</a> file in the "vecmath" directory for instructions.<br> </p> <h3><span style="font-weight: bold; text-decoration: underline;"></span><span style="text-decoration: underline;">System Requirements</span></h3> <p><span style="font-weight: bold; text-decoration: underline;"></span></p> <p><span style="font-weight: bold; text-decoration: underline;"></span>The following operating environments have been tested:<br> </p> <ul> <li>Solaris: Sparc (Ultra60 or better) running Solaris 9 with Forte C compiler version 6.2 or GNU gcc version 3.3.2</li> <li>Linux: i386/i586 running SuSE 9 or RedHat 9.0</li> <li>Windows: Windows/XP with Microsoft Visual C++ 6.0 or the gcc that comes with <a href="http://www.mingw.org">MinGW version 3.1.0-1</a> (Windows 2000 should work, but is untested)<br> </li> </ul> <p> The following software must be installed:<br> </p> <ul> <li><a href="http://java.sun.com/j2se">JDK 1.5.0 </a><br> </li> <li><a href="http://jakarta.apache.org/ant">Apache Ant 1.6.1</a><br> </li> <li>C Compiler (Either one of the following depending on the platform)<br> </li> <ul> <li>Solaris:<br> </li> <ul> <li>Sun ONE Studio 8 (formerly Forte Tools)'s Compiler or GNU Compiler Collection, <a href="http://gcc.gnu.org">GCC version 3.3.2</a><br> </li> </ul> <li>Linux:<br> </li> <ul> <li>GNU Compiler Collection, <a href="http://gcc.gnu.org">GCC version 3.2.2</a><br> </li> </ul> <li>Windows<br> </li> <ul> <li>Microsoft Visual C++ 6.0 or later or GNU Compiler Collection, GCC version 3.2.3 that comes with<a href="http://www.mingw.org"> MinGW version 3.1.0-1</a><span style="font-weight: bold; text-decoration: underline;"><br> </span></li> </ul> </ul> </ul> <h3><span style="font-weight: bold; text-decoration: underline;">Building the 3D packages</span></h3> <p><span style="font-weight: bold; text-decoration: underline;"></span><span style="font-weight: bold; text-decoration: underline;"></span>Before you start building, your PATH must include the following directories: </p> <ul> <li><ant-root-dir>/bin<br> </li> <li><jdk-root-dir>/bin<br> </li> <li><compiler-root-dir>/bin<br> </li> </ul> <p>The default target, jar-opt, creates an optimized jar files and native libraries. </p> <p>On Amd64 platform an OutOfMemoryError can be seen. In this case set the environment variable ANT_OPTS to -Xmx256m.<br> </p> <p>Steps: </p> <ul> <code> cd <j3d-root-dir>/j3d-core<br> ant</code> </ul> <p>The above steps build both the Java and native code for javax.media.j3d and com.sun.j3d.* packages. </p> <p>The build will be placed in j3d-core/build/<platform>/opt where <platform> is determined from the <code>ant echo</code> command: </p> <ul> <code>ant echo</code> </ul> To see other targets that are available, type "ant -projecthelp". Note that ant must be run from the top-level directory. <p>The default compiler for native code compilation is set to "gcc". This value is set in the <a href="build.properties">build.properties</a> file located in the j3d-core directory. The compiler property is "build.comp".<br> </p> <p>On a Solaris platform with Forte compiler installed, build.comp can be set to "forte". On a Windows platform installed Visual C++, build.properties can be set to "vc".<br> </p> <p>NOTE: For Windows platform only, the property "build.rend" in build.properties can be modified to use "d3d" (Direct3D API for rendering) besides the default value "ogl".<br> </p> <p>NOTE: You can also modify the properties via command-line options to ant, for example, "ant -Dbuild.comp=vc"<br> </p> <h3><span style="font-weight: bold; text-decoration: underline;">Running the 3D examples</span></h3> <p>Please refer to <a href="../j3d-examples/README-build.html">README-build.html</a> in j3d-examples for details on building and running the 3D example programs.<br> </p> </body> </html>