Basic System Requirements:
Windows/x86 (32-bit currently, but 64-bit is known to work)
- Windows 2000 or later
- Microsoft Visual C ++ 6.0 or later, or mingw Compilers
- Sun JDK 1.4.2 or later
-
- InstallJDK:
To compile jogl, JDK 1.4.2 or later is required. JDK 1.6.0 is installed on the system. Note that the environment variable java_home must be set. You can set it in the "environment variable" dialog box, or enter SET java_home = jdk_home_path in cmd, the jdk_home_path here is the JDK root directory.
-
- Install ant:
SlaveThe http://ant.apache.org downloads and decompress ant, and then adds its bin/directory to the path in the environment variable.
- InstallAnlr:
Download from the http://www.antlr.org and unzip anlr, which is used to parse C when compiling gluegenCodeIn fact, only the anlr. jar file is required. It should be noted that I used the latest 3.0.1 version on the network during the initial installation, but I always reported anlr errors during the compilation of gluegen, it is not until you replace anlr with version 2.7.2 that the compilation process can be successful.
-
- RemoveClasspath environment variables:
To ensure that the jogl compilation process is not affected by the existing environment variables, you need to set the content of class_path to null.
-
- Check the code directory:
Jogl uses gluegen to automatically generate most of the jogl or JNI code. Therefore, the jogl/and gluegen/subdirectories must be in the same path.
-
- Copy and edit gluegen. properties:
In the Code directoryGluegen/Make/gluegen. Properties Copy to the root directory of the user, usually in C:/Documents and Settings/username, and change the anlr directory in the file to anlr. jar directory. In my system, this directory is anlr. jar = C:/Java/antlr-2.7.2/anlr. jar
- Copy and editJogl. properties:
In the Code directoryGluegen/Make/Make/jogl. Properties Copy to the root directory of the user, usually in C:/Documents and Settings/username. There are two items in the file that may need to be modified:
- Compiler: vc6, vc7, vc8, and mingw can be used.
- Cg library path: Of course, you must first install the cg sdk. When compiling, CG 1.5 is used. You can download it from http://developer.nvidia.com/object/cg_toolkit.html.
-
- Compile the source code tree:
Enter the make subdirectory of the project directory from the command line CMD and enter the "ant" command to compile gluegen and jogl. To add the CG compilation, use the command "Ant-djogl. CG = 1 ".
As for the steps to verify the compilation effect in the references, I will not talk about it here.
References:
1. "How to Build the jogl OpenGL binding for Java", why? REV = Head & Content-Type = text/html