Compiling JOGL from CVS under Java 1.5

It complained about some classes missing somewhere in a package with a name beginning with sun. GlueGL or something like that – I do not have now an access to the machine, but I may check the class name if you are interested.

Does it mean that the current JOGL does not compile under 1.5, or I did something wrong? Or is it a bug?

Artur

I suspect you didn’t follow the build instructions. You need Ant, ANTLR and a C compiler like MingW in order to build JOGL, but once all of those pieces are in place building it is pretty simple.

I encountered mainly cannot resolve symbol : variable GLU when I tried to compile the CVS under Java 1.4.2_08. Detail as follows compiling under win XP:

  1. ant - from netbeans in C:\Program Files\netbeans-4.1\ide5\ant\bin

  2. antlr-2.7.5.jar - downloaded and place in C:\download\antlr-2.7.5\

  3. minGW - downloaded MinGW-4.1.1.exe and run it to install under C:\MinGW

  4. Followed the instruction given for build so copy the jogl.properties to my home directory with the following modification :
    java.home.dir=C:/j2skd1.4.2_08
    antlr.jar=C:/download/antlr-2.7.5/antlr-2.7.5.jar

  5. Building it with
    set CLASSPATH=
    “C:\Program Files\netbeans-4.1\ide\ant\bin\ant” win32.mingw

and get can’t find tools.jar so I copied C:\j2dkd1.4.2_08\lib\tools.jar to C:\Program Files\Java\j2re1.4.2_08\lib
Managed to compile and display
:
:
[javac] C:\mysourcepath\jogl\src\classes\com\sun\opengl\impl\GLUquadricImpl.java:1267: cannot resolve symbol
[javac] symbol : variable GLU
[javac] location: class com.sun.opengl.impl.GLUquadricImpl
[javac] case GLU.GLU_SMOOTH :
[javac] ^
:
:
[javac] 100 errors

BUILD FAILED
C:\mysourcepath\jogl\make\build.xml:1066: The following error occurred while executing this line:
C:\mysourcepath\jogl\make\build.xml:641: Compile failed; see the compiler error output for details.

Total time: 9 seconds

I can’t figure out why not able to resolve GLU; must have missed out something but what it is ???

Try “ant clean” followed by “ant win32.mingw” and attach the entire output as a text file.

Thanks once again, I finally managed to build the jogl and the jogl-demos, they work fine. I procede to compile for my test program (I’ve posted under JInternalFrame with GLJPanel) and encounter some problem; this time is with GLCanvas.

The problems were probably causes by some incompatible configuration of Ant, but then I have reinstalled Ant, and now I can compile JOGL under 1.6, but not under 1.5. Under 1.5, there was an error - CToken class missing. So I did ant clean, and recompiled it changing only javac to 1.6, and then jogl was compiled ok.

This error occurs because you dropped antlr.jar into your jre/lib/ext directory in your 1.5 installation. I’ve just added documentation on this common build problem to the build documentation linked from the JOGL home page.