Problems building JOGL 2.x demos from source

This is the full bug report related to a previous post on this subject.

I downloaded the latest nightly builds of jogl-2.0-windows-i586.zip and jogl-demos-src.zip dated 09-Aug-2009 03:01 and tried to build the demos from the source on this Windows Vista machine.

OS: Windows Vista Ultimate 32-bit SP2
Java: JSE 6 Update 15
Build Environment: Both ant and NetBeans

The following is the abridged list of compilation errors I received (with some duplicate symbols removed):

D:\Projects\jogl-demos\src\demos\nurbs\curveapp\CurveApp.java:12: cannot find symbol
symbol : class GLCanvas
location: package javax.media.opengl
import javax.media.opengl.GLCanvas;
D:\Projects\jogl-demos\src\demos\nurbs\curveapp\CurveApp.java:123: cannot find symbol
symbol : class GLCanvas
location: class demos.nurbs.curveapp.CurveApp
private GLCanvas glCanvas;
D:\Projects\jogl-demos\src\demos\nurbs\curveapp\CurveApp.java:540: cannot find symbol
symbol : class GLCanvas
location: class demos.nurbs.curveapp.CurveApp
public GLCanvas getGlCanvas() {
D:\Projects\jogl-demos\src\demos\nurbs\curveapp\GLListener.java:8: cannot find symbol
symbol : class GLUT
location: package com.sun.opengl.util
import com.sun.opengl.util.GLUT;
D:\Projects\jogl-demos\src\demos\nurbs\curveapp\GLListener.java:34: cannot find symbol
symbol : class GLUT
location: class demos.nurbs.curveapp.GLListener
private GLUT glut;
D:\Projects\jogl-demos\src\demos\nurbs\icons\IconFactory.java:3: package com.sun.opengl.impl.io does not exist
import com.sun.opengl.impl.io.StreamUtil;
D:\Projects\jogl-demos\src\demos\nurbs\surfaceapp\GLListener.java:8: package com.sun.opengl.util.glut.gl2 does not exist
import com.sun.opengl.util.glut.gl2.GLUTgl2;
D:\Projects\jogl-demos\src\demos\nurbs\surfaceapp\GLListener.java:96: cannot find symbol
symbol : class GLUTgl2
location: class demos.nurbs.surfaceapp.GLListener
private GLUTgl2 glut;
D:\Projects\jogl-demos\src\demos\vertexArrayRange\VertexArrayRange.java:54: package javax.media.opengl.util does not exist
import javax.media.opengl.util.Animator;
D:\Projects\jogl-demos\src\demos\vertexArrayRange\VertexArrayRange.java:722: cannot find symbol
symbol : class Animator
location: class demos.vertexArrayRange.VertexArrayRange
private static void runExit(final Animator animator) {
D:\Projects\jogl-demos\src\jbullet\src\javabullet\BulletGlobals.java:33: package javax.vecmath does not exist
import javax.vecmath.Vector3f;
D:\Projects\jogl-demos\src\jbullet\src\javabullet\BulletGlobals.java:76: cannot find symbol
symbol : class Vector3f
location: class javabullet.BulletGlobals
public static final Vector3f gOldPickingPos = new Vector3f();
^
D:\Projects\jogl-demos\src\jbullet\src\javabullet\BulletGlobals.java:84: cannot find symbol
symbol : class Vector3f
location: class javabullet.BulletGlobals
public static final Vector3f ZERO_VECTOR3 = new Vector3f(0f, 0f, 0f);
^
D:\Projects\jogl-demos\src\jbullet\src\javabullet\collision\narrowphase\ManifoldPoint.java:26: package javax.vecmath does not exist
import javax.vecmath.Vector3f;
D:\Projects\jogl-demos\src\jbullet\src\javabullet\collision\dispatch\CollisionObject.java:30: package javax.vecmath does not exist
import javax.vecmath.Vector3f;
D:\Projects\jogl-demos\src\jbullet\src\javabullet\collision\narrowphase\ManifoldPoint.java:36: cannot find symbol
symbol : class Vector3f
location: class javabullet.collision.narrowphase.ManifoldPoint
public final Vector3f localPointA = new Vector3f();
^ ^
D:\Projects\jogl-demos\src\jbullet\src\javabullet\linearmath\Transform.java:27: package javax.vecmath does not exist
import javax.vecmath.Matrix3f;
D:\Projects\jogl-demos\src\jbullet\src\javabullet\linearmath\Transform.java:28: package javax.vecmath does not exist
import javax.vecmath.Quat4f;
D:\Projects\jogl-demos\src\jbullet\src\javabullet\linearmath\Transform.java:29: package javax.vecmath does not exist
import javax.vecmath.Vector3f;
D:\Projects\jogl-demos\src\jbullet\src\javabullet\collision\dispatch\CollisionObject.java:56: cannot find symbol
symbol : class Vector3f
location: class javabullet.collision.dispatch.CollisionObject
protected final Vector3f interpolationLinearVelocity = new Vector3f();
^
D:\Projects\jogl-demos\src\jbullet\src\javabullet\TransformStackList.java:27: package javax.vecmath does not exist
import javax.vecmath.Matrix3f;
D:\Projects\jogl-demos\src\jbullet\src\javabullet\MatrixStackList.java:26: package javax.vecmath does not exist
import javax.vecmath.Matrix3f;
D:\Projects\jogl-demos\src\jbullet\src\javabullet\MatrixStackList.java:33: cannot find symbol
symbol: class Matrix3f
public class MatrixStackList extends StackList {
D:\Projects\jogl-demos\src\jbullet\src\javabullet\Vector4StackList.java:26: package javax.vecmath does not exist
import javax.vecmath.Vector4f;
D:\Projects\jogl-demos\src\jbullet\src\javabullet\Vector4StackList.java:33: cannot find symbol
symbol: class Vector4f
public class Vector4StackList extends StackList {
D:\Projects\jogl-demos\src\jbullet\src\javabullet\QuatStackList.java:26: package javax.vecmath does not exist
import javax.vecmath.Quat4f;
D:\Projects\jogl-demos\src\jbullet\src\javabullet\QuatStackList.java:33: cannot find symbol
symbol: class Quat4f
public class QuatStackList extends StackList {
D:\Projects\jogl-demos\src\jbullet\src\javabullet\linearmath\Transform.java:40: cannot find symbol
symbol : class Matrix3f
location: class javabullet.linearmath.Transform
public final Matrix3f basis = new Matrix3f();
^
D:\Projects\jogl-demos\src\jbullet\src\javabullet\linearmath\Transform.java:117: cannot find symbol
symbol : class Quat4f
location: class javabullet.linearmath.Transform
public Quat4f getRotation() {
^
D:\Projects\jogl-demos\src\jbullet\src\javabullet\linearmath\Transform.java:131: cannot find symbol
symbol : class Quat4f
location: class javabullet.linearmath.Transform
public void setRotation(Quat4f q) {
^ ^
D:\Projects\jogl-demos\src\jbullet\src\javabullet\Vector4StackList.java:35: cannot find symbol
symbol : class Vector4f
location: class javabullet.Vector4StackList
public Vector4f get(float x, float y, float z, float w) {
^ ^ ^
D:\Projects\jogl-demos\src\jbullet\src\javabullet\QuatStackList.java:53: cannot find symbol
symbol : class Quat4f
location: class javabullet.QuatStackList
protected void copy(Quat4f dest, Quat4f src) {
^
D:\Projects\jogl-demos\src\jbullet\src\javabullet\collision\broadphase\BroadphaseInterface.java:26: package javax.vecmath does not exist
import javax.vecmath.Vector3f;
^
D:\Projects\jogl-demos\src\jbullet\src\javabullet\util\HashUtil.java:26: package gnu.trove does not exist
import gnu.trove.THashMap;
D:\Projects\jogl-demos\src\jbullet\src\javabullet\util\HashUtil.java:27: package gnu.trove does not exist
import gnu.trove.TObjectObjectProcedure;
D:\Projects\jogl-demos\src\jbullet\src\javabullet\collision\narrowphase\PersistentManifold.java:30: package javax.vecmath does not exist
import javax.vecmath.Vector3f;
D:\Projects\jogl-demos\src\jbullet\src\javabullet\collision\narrowphase\PersistentManifold.java:31: package javax.vecmath does not exist
import javax.vecmath.Vector4f;
D:\Projects\jogl-demos\src\jbullet\src\javabullet\collision\dispatch\ManifoldResult.java:34: package javax.vecmath does not exist
import javax.vecmath.Vector3f;
D:\Projects\jogl-demos\src\jbullet\src\javabullet\collision\narrowphase\DiscreteCollisionDetectorInterface.java:28: package javax.vecmath does not exist
import javax.vecmath.Vector3f;
D:\Projects\jogl-demos\src\jbullet\src\javabullet\linearmath\IDebugDraw.java:27: package javax.vecmath does not exist
import javax.vecmath.Vector3f;
D:\Projects\jogl-demos\src\jbullet\src\javabullet\collision\dispatch\ManifoldResult.java:87: cannot find symbol
symbol : class Vector3f
location: class javabullet.collision.dispatch.ManifoldResult
public void addContactPoint(Vector3f normalOnBInWorld, Vector3f pointInWorld, float depth) {
^

Clearly I am missing something, can someone please tell me what that is?

Thanks,

Jarrick Chagma

It’s not you, the demo source isn’t in a compilable state. BTW, I’m a complete OpenGL newbie, but this clearly is beyond simple build/setup/environment issues.

I tried the same demo.nurbs.curveapp code… I could make a few fixes:

change this: import javax.media.opengl.GLCanvas;
to this: import javax.media.opengl.awt.GLCanvas;

change this: import com.sun.opengl.util.GLUT;
to this: import com.sun.opengl.util.gl2.GLUT;

But I’m still getting a non of compilation errors that are clearly not basic build or environment issues. For example, I get errors on the following three (separate) lines:

this.nurbs = glu.gluNewNurbsRenderer();
gl.glMatrixMode(GL2ES1.GL_MODELVIEW);
gl.glLoadIdentity();

[quote]It’s not you, the demo source isn’t in a compilable state.
[/quote]
I see, well thanks for the confirmation. I assumed I was doing something wrong.

That’s a real shame as I was hoping to learn about JOGL by studying the demo source code.

Jarrick Chagma

To be fair, this is the nightly build, and not even a beta. I’m sure the 1.1.1a release build works much better.

They still shouldn’t have demo source that doesn’t compile. I also hate spending effort learning the old maintenance branch which will soon be replaced by a much better update.

Sorry … that is not true.
Nightly builds also produce the jogl-demos bytecode.
Check the STATUS log file … it’s all on OK.

http://download.java.net/media/jogl/builds/nightly/logs/

OK, so what’s the trick to building the demos successfully? How do I resolve the compilation errors I am getting?

Thanks,

Jarrick Chagma