So I've gone through about 3 different tutorials I've found on the net and I have a few questions.
1. What jars do I put in my user library in Eclipse? Right now I have gluegen-rt.jar, jogl.all.jar, newt.event.jar, and nativewindow.core.jar. After that I set the Native User Library to my lib folder. Using this code I found in a tutorial: import java.awt.Frame; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.media.opengl.*; import javax.media.opengl.awt.GLCanvas; public class SimpleScene { public static void main(String[] args) { GLProfile glp = GLProfile.getDefault(); GLCapabilities caps = new GLCapabilities(glp); GLCanvas canvas = new GLCanvas(caps); Frame frame = new Frame("AWT Window Test"); frame.setSize(300, 300); frame.add(canvas); frame.setVisible(true); // by default, an AWT Frame doesn't do anything when you click // the close button; this bit of code will terminate the program when // the window is asked to close frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { frame.dispose(); System.exit(0); } }); } } I get this error message: Exception in thread "main" java.lang.NoSuchMethodError: javax.media.opengl.GLDrawableFactory.initialize()V at javax.media.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1198) at javax.media.opengl.GLProfile.access$000(GLProfile.java:71) at javax.media.opengl.GLProfile$1.run(GLProfile.java:112) at java.security.AccessController.doPrivileged(Native Method) So I'm lost at the moment. Any hep would be great |
Administrator
|
Hi
We are not responsible for bad and/or obsolete tutorials you found on the world wide web except ours. I advise you to look at this one: http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE Sorry to be harsh but please, before complaining and speaking about frustration, have a look at official tutorials. Some people spent some time to write them; if nobody reads them, they are useless.
Julien Gouesse | Personal blog | Website
|
Administrator
|
In reply to this post by TC
On Wednesday, October 19, 2011 10:53:58 PM TC [via jogamp] wrote:
> > So I've gone through about 3 different tutorials I've found on the net As Julien explains, please reflect our docs/wiki here, which may also lead to point out bugs we have - so we can fix them. > and I > have a few questions. > > 1. What jars do I put in my user library in Eclipse? Right now I have > gluegen-rt.jar, jogl.all.jar, newt.event.jar, and > nativewindow.core.jar. Starting w/ RC3 http://jogamp.org/deployment/v2.0-rc3/archive/ the JAR files are described here: http://jogamp.org/wiki/index.php/Jogamp_Versioning_and_Releases#Release_and_Archived_Files http://jogamp.org/jogl/doc/deployment/JOGL-DEPLOYMENT.html#NativeJARFileNameConvention In short, you would need gluegen-rt.jar and jogl.all.jar plus the single native library files (not as a JAR). Then follow the receipe Julien already pointed out: http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE Mind that you now can attach the source files to the JAR (netbeans/eclipse/..), ie jogl-java-src.zip to jogl.all.jar. This will allow you to see the proper JOGL API doc (on-the-fly generated javadoc) plus you can debug code w/ source or just browse through code to get a better understanding of it's meaning. The currently pre RC4 version, ie available here: http://jogamp.org/deployment/archive/master/gluegen_424-joal_228-jogl_526-jocl_455/archive/ also adds the capability of using the native JAR files with any launching method, as described here: http://jausoft.com/blog/2011/09/23/jogamp-deployment-enhancements-automatic-loading-of-native-jars-appletapplication/ just drop the native jar files where the pure java jar files resides, ie: /home/dude/myproject/lib/jogamp/ gluegen-java-src.zip gluegen-rt.jar gluegen-rt-natives-solaris-i586.jar gluegen-rt-natives-solaris-amd64.jar gluegen-rt-natives-macosx-universal.jar gluegen-rt-natives-linux-amd64.jar gluegen-rt-natives-windows-amd64.jar gluegen-rt-natives-linux-i586.jar gluegen-rt-natives-windows-i586.jar jogl-java-src.zip jogl.all.jar jogl-all-natives-linux-amd64.jar jogl-all-natives-windows-amd64.jar jogl-all-natives-linux-i586.jar jogl-all-natives-windows-i586.jar jogl-all-natives-macosx-universal.jar jogl-all-natives-solaris-amd64.jar jogl-all-natives-solaris-i586.jar Same procedure, use gluegen-rt.jar and jogl.all.jar, attach their source zip files to them and you are done. Here, you don't need to take care about the single native library files anymore. The right (os.and.arch) native JAR files are being picked up automatically. I hope this helps. Soon (RC4) we will update the wiki pages in this regard. Maybe somebody (ie you?) like to volunteer and do it ? Cheers, Sven |
Administrator
|
In reply to this post by gouessej
On Wednesday, October 19, 2011 11:12:24 PM gouessej [via jogamp] wrote:
> > Hi > > We are not responsible for bad and/or obsolete tutorials you found on the > world wide web except ours. I advise you to look at this one: > http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE > http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE > > Sorry to be harsh but please, before complaining and speaking about > frustration, have a look at official tutorials. Some people spent some time > to write them; if nobody reads them, they are useless. I agree ofc .. our wiki pages should be reviewed first. This allows us to fix bugs in them, and helps to make them better. ~Sven |
Free forum by Nabble | Edit this page |