OpenGL for Java: (all platforms) -------------------------------- We are still collecting information regarding OpenGL for Java and will update this as time goes on. We will only be able to provide basic help for Java users, since we have little experience ourselves. Nonetheless, we encourage a few brave souls to try it (and will give extra credit points for people who do), since we would like to move everything to Java in future versions of 427. There are two demo programs in the directories Gears and JOGL2DBasics. Each directory contains a Makefile that works on the Linux Lab machines. (In both cases, saying "make" will both compile and execute the program.) WARNING: I have been able to run the programs when I logged on in the Linux Lab, but not remotely. JOGL on the CSIC Linux Lab Machines ----------------------------------- Before compiling and executing the program, however, it is necessary to set the CLASSPATH and LD_LIBRARY_PATH environment variables. This can be done by adding the following command to the end of your ".cshrc" file in your home directory (or creating one if it does not exist). setenv CLASSPATH .:/usr/local/jogl-linux/jogl.jar setenv LD_LIBRARY_PATH /usr/X11R6/lib:/usr/local/jogl-linux Then log off and log back in again to activate the changes. This assumes that your shell is either csh or tcsh. (Contact me if you do not know what shell you are using, but tcsh is the default for our accounts in the Linux Lab.) If you are a more sophisticated user, and are already assigning values to your CLASSPATH or LD_LIBRARY_PATH variables, then just append these values to the end of your current settings. For example, here is how to add jogl.jar to the end of your existing class path: setenv CLASSPATH ${CLASSPATH}:/usr/local/jogl-linux/jogl.jar Installing JOGL on your Own Machine ----------------------------------- Note that the above settings are for the CSIC Linux Labs. If you have installed JOGL on your own Linux machine (see the links below for some hints on how to do this), then the CLASSPATH variable should contain the complete path name of the JOGL jar file and should also contain your current directory (".") (or wherever you store your .class files after compilation). The LD_LIBRARY_PATH variable should point both to the library directory containing the OpenGL shared libraries (e.g., libGL.so and libGLU.so), and the directory containing your JOGL directories (e.g., libjogl.so). In both cases, the directory or file names in these path variables are separated by a colon (":") with no additional white space. If you are interested in finding out on your own how to use OpenGL for Java here are a few pointers. 1. You need to have OpenGL already installed on your system. See the files ../C++/VisualCPP/ReadmeForVisualC++.txt (for Windows) ../C++/ReadmeForUnix.txt (for Linux). 2. It is not necessary to install GLUT. Instead, use the Java AWT for constructing windows. 3. Use the JOGL bindings for OpenGL. The information and latest downloads can be found at: https://jogl.dev.java.net/ An excellent source on how to install JOGL can be found at: http://today.java.net/pub/a/today/2003/09/11/jogl2d.html Another source of information: http://boshart.csc.tntech.edu/java/4750main.html