Hi i have problem with running jogl bytecodes
i have been following this thread
http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=jogl;action=display;num=1060434814
and copied
dlls in windows/system32
jar in jdk/jre/lib/ext
Exception
the result is that i can now compile(“javac whatever.java”), but i cannot “java whatever”
it gives an exception in thread “main” java.lang.NoClassDefFoundError :net/java/games/jogl/GLEventListener…etc
i have test it with a helloworld and i can ensure everything is working
any help would be appreciated
the code i compiled with are
/**
- This is a short demo illustrating the basic structure
- of a JOGL application. It corresponds to the first
- attempt example from Hill
*/
import java.awt.;
import java.awt.event.;
import net.java.games.jogl.*;
public class firstAttempt extends Frame implements GLEventListener{
public firstAttempt() {
GLCapabilities caps = new GLCapabilities();
GLCanvas canvas =
GLDrawableFactory.getFactory().createGLCanvas(caps);
canvas.addGLEventListener(this);
add("Center", canvas);
setSize(400,300);
show();
}
public static void main( String args[]) {
firstAttempt frame = new firstAttempt();
//exit if frame's close box is clicked
frame.addWindowListener( new WindowAdapter() {
public void windowClosed(WindowEvent e){
System.exit(0);
}
public void windowClosing(WindowEvent e) {
windowClosed(e);
}
}
);
}
/* The functions below are required because we are a GLEventListener.
We could also have put them in another class and put that class in the
addGLEventListener method above.
*/
/**
* Executed exactly once to initialize the
* associated GLDrawable
*/
public void init(GLDrawable drawable) {
GL gl = drawable.getGL();
GLU glu = drawable.getGLU();
/**
* Set the background colour when the GLDrawable
* is cleared
*/
gl.glClearColor( 1.0f, 1.0f, 1.0f, 1.0f ); //white
/** Set the drawing colour to black */
gl.glColor3f( 0.0f, 0.0f, 0.0f );
gl.glPointSize(4.0f); //a 'dot' is 4 by 4 pixels
}
/**
* Executed if the associated GLDrawable is resized
*/
public void reshape(GLDrawable drawable, int x, int y, int width, int height) {
GL gl = drawable.getGL();
GLU glu = drawable.getGLU();
gl.glViewport( 0, 0, width, height );
gl.glMatrixMode( GL.GL_PROJECTION );
gl.glLoadIdentity();
glu.gluOrtho2D( 0.0, 400.0, 0.0, 300.0);
}
/** This method handles the painting of the GLDrawable */
public void display(GLDrawable drawable) {
GL gl = drawable.getGL();
GLU glu = drawable.getGLU();
/** Clear the colour buffer */
gl.glClear( GL.GL_COLOR_BUFFER_BIT );
/** Draw some dots */
gl.glBegin( GL.GL_POINTS );
gl.glVertex2i( 100,50 );
gl.glVertex2i( 100,130 );
gl.glVertex2i( 150,130 );
gl.glEnd();
}
/** This method handles things if display depth changes */
public void displayChanged(GLDrawable drawable,
boolean modeChanged,
boolean deviceChanged){
}
}