Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Trying to get Jogl to work

  1. #1
    Junior Member
    Join Date
    Aug 2012
    Posts
    8
    My Mood
    Mellow
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Trying to get Jogl to work

    Trying to use a very simple example to get things started, here is the code:

    package VectorMath;
    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
    import java.awt.Color;
    import java.awt.Frame;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import net.java.games.jogl.GLCanvas;
    import net.java.games.jogl.GLCapabilities;
    import net.java.games.jogl.GLDrawableFactory;
     
    public class VectorMath {
     
      public static void main(String[] args){
     
        Frame frame = new Frame("Hello World");
     
         GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities());
        frame.add(canvas);
     
         frame.setSize(400, 400);
        frame.setBackground(Color.white);
     
        frame.addWindowListener(new WindowAdapter()
        {
              public void windowClosing(WindowEvent e)
            {
                System.exit(0);
            }
        });
     
         frame.show();
     
      }
    }

    Here is the link error it's producing:

     
    run:
    Exception in thread "main" java.lang.UnsatisfiedLinkError: net.java.games.jogl.impl.JAWTFactory.JAWT_GetAWT0(Ljava/nio/Buffer;)Z
    	at net.java.games.jogl.impl.JAWTFactory.JAWT_GetAWT0(Native Method)
    	at net.java.games.jogl.impl.JAWTFactory.JAWT_GetAWT(JAWTFactory.java:25)
    	at net.java.games.jogl.impl.NativeLibLoader$1.run(NativeLibLoader.java:66)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at net.java.games.jogl.impl.NativeLibLoader.<clinit>(NativeLibLoader.java:46)
    	at net.java.games.jogl.impl.GLContext.<clinit>(GLContext.java:51)
    	at net.java.games.jogl.impl.windows.WindowsGLContextFactory.createGLContext(WindowsGLContextFactory.java:52)
    	at net.java.games.jogl.GLCanvas.<init>(GLCanvas.java:68)
    	at net.java.games.jogl.GLDrawableFactory.createGLCanvas(GLDrawableFactory.java:117)
    	at net.java.games.jogl.GLDrawableFactory.createGLCanvas(GLDrawableFactory.java:80)
    	at VectorMath.VectorMath.main(VectorMath.java:20)
    Java Result: 1
    BUILD SUCCESSFUL (total time: 1 second)

    Not sure if I'm missing a file or what is going on, can anyone shed some light?
    This is coming from the netbeans ide.


  2. #2
    Junior Member
    Join Date
    Aug 2012
    Posts
    8
    My Mood
    Mellow
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Any ideas? Anyone know where i can go to find the answer?

  3. #3
    Junior Member
    Join Date
    Nov 2011
    Location
    Aarhus, Denmark
    Posts
    28
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Did you place the native dll files so they can be loaded?
    When using a NetBeans project the correct placement is usually in the root of your projects folder.
    If you are using the new jogl 2 there is also a jar available you can add as a library.

    /Rolf

Similar Threads

  1. JOGL java bindings resources
    By lilroo in forum Member Introductions
    Replies: 2
    Last Post: September 10th, 2011, 07:27 PM
  2. Replies: 0
    Last Post: August 6th, 2011, 02:07 AM
  3. Mendelbrot set implementation using JOGL
    By Kalyan in forum Member Introductions
    Replies: 0
    Last Post: March 29th, 2011, 06:53 PM
  4. JOGL Problem
    By Brt93yoda in forum What's Wrong With My Code?
    Replies: 6
    Last Post: September 9th, 2010, 08:04 PM
  5. JOGL
    By helloworld922 in forum Java IDEs
    Replies: 3
    Last Post: July 21st, 2009, 03:19 AM