Problem with gluOrtho2D (0.0, 500.0, 0.0, 300.0)

Hi, ???
I am using eclipse to compile and run jogl demos. I have a very simple program to test that everything is working. However I get a bug which seems to be related to a single line in the code. This line is as follows:

glu.gluOrtho2D (0.0, 500.0, 0.0, 300.0);

if I comment out the line above then the application runs fine but of course all I get a blank screen. However if I include this line then i get the following errors:

???


Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: dispatch_gluOrtho2D
	at net.java.games.jogl.impl.GLUImpl.dispatch_gluOrtho2D(Native Method)
	at net.java.games.jogl.impl.GLUImpl.gluOrtho2D(GLUImpl.java:381)
	at SecondGLEventListener.init(SecondGLEventListener.java:26)
	at net.java.games.jogl.impl.GLDrawableHelper.init(GLDrawableHelper.java:68)
	at net.java.games.jogl.GLCanvas$InitAction.run(GLCanvas.java:187)
	at net.java.games.jogl.impl.windows.WindowsGLContext.makeCurrent(WindowsGLContext.java:144)
	at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.makeCurrent(WindowsOnscreenGLContext.java:110)
	at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:162)
	at net.java.games.jogl.GLCanvas.reshape(GLCanvas.java:105)
	at java.awt.Component.setBounds(Unknown Source)
	at java.awt.BorderLayout.layoutContainer(Unknown Source)
	at java.awt.Container.layout(Unknown Source)
	at java.awt.Container.doLayout(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validate(Unknown Source)
	at java.awt.Window.show(Unknown Source)
	at java.awt.Component.show(Unknown Source)
	at java.awt.Component.setVisible(Unknown Source)
	at SecondJoglApp$1.run(SecondJoglApp.java:18)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)


I have tried all the installation tutorials that are available on the internet but I still get this problem.
I have too question…

  1. How do I fix this bug . ???
  2. When will an installer be released which puts everything in the right place on its own. ;D

thanks

I think you have mismatched versions of jogl.jar and jogl.dll. You should delete all copies of these files (and make sure you haven’t dropped any JOGL-related files into the JRE/JDK, which causes problems with Java Web Start and other applications) and re-install. I’d also recommend you upgrade to the latest nightly build on the JOGL web page; there are API changes involved, but the new code is much more robust than older versions.

Hi I just downloaded the lastest build of the jogl.jar file. I opened it up to find no mension of the net file path.
My demo uses the following header files


import net.java.games.jogl.*;
import net.java.games.jogl.GLU;

but the classes in the jogl.jar file are as follows.


com---------sun----------glugen----runtime
                       +-----------opengl----cd
                                             +--------impl
                                             +--------utils

etc

where is the net.game.cd path
thanks

The namespace of the classes has changed from net.java.games.jogl to javax.media.opengl. Some of the public APIs have also changed. See the browsable Javadoc on the JOGL home page for the new APis. There isn’t a document yet describing all of the differences between JOGL 1.1.1 and the current JSR-231 APIs although this thread describes some of the high-level changes.