JOGL

Discussion in 'Java' started by Jon Harrop, Oct 9, 2007.

  1. Jon Harrop

    Jon Harrop Guest

    Jon Harrop, Oct 9, 2007
    #1
    1. Advertising

  2. Hunter Gratzner, Oct 9, 2007
    #2
    1. Advertising

  3. Jon Harrop <> burped up warm pablum in
    news::

    >
    > Anyone managed to get JOGL working under AMD64 Debian?


    Only with Nvidia video cards and their *sinful* binary drivers. ATI is a lost cause when it comes to 3-d
    drivers.


    --
    Tris Orendorff
    [ Anyone naming their child should spend a few minutes checking rhyming slang and dodgy sounding
    names. Brad and Angelina failed to do this when naming their kid Shiloh Pitt. At some point, someone at
    school is going to spoonerise her name.
    Craig Stark]
     
    Tris Orendorff, Oct 9, 2007
    #3
  4. Jon Harrop

    Jon Harrop Guest

    Hunter Gratzner wrote:
    > On Oct 9, 6:12 am, Jon Harrop <> wrote:
    >> Anyone managed to get JOGL working under AMD64 Debian?
    >>
    >> --
    >> Dr Jon D Harrop, Flying Frog
    >> Consultancyhttp://www.ffconsultancy.com/products/?u

    >
    > Why do you think we are eager to help someone who abused the group for
    > advertising?


    This raises an interesting question for me. I appreciate that the Java
    community is very big but does it consist largely of freeloaders who don't
    spend money?

    So, is there a viable market for writing high-quality commercial tools and
    libraries for Java programmers? If so, what is the easiest way to reach the
    target market with advertising?

    --
    Dr Jon D Harrop, Flying Frog Consultancy
    http://www.ffconsultancy.com/products/?u
     
    Jon Harrop, Oct 10, 2007
    #4
  5. Jon Harrop

    Jon Harrop Guest

    Tris Orendorff wrote:
    > Jon Harrop <> burped up warm pablum in
    > news::
    >>
    >> Anyone managed to get JOGL working under AMD64 Debian?

    >
    > Only with Nvidia video cards and their *sinful* binary drivers. ATI is a
    > lost cause when it comes to 3-d drivers.


    That's fine, we only use nVidia cards anyway. But I'm having a hell of a job
    getting JOGL to work. I tried getting the latest builds of JOGL and the
    JOGL demos but I got:

    $ cd jogl-demos
    $ java -cp build/jogl-demos.jar demos.gears.Gears
    Exception in thread "main" java.lang.NoClassDefFoundError:
    javax/media/opengl/GLEventListener
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at
    java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

    So I tried getting a coherent distribution from the latest stable releases
    (jogl-1.1.1-rc3) but I still get the same error. I've tried recompiling the
    whole thing from scratch and still get the same error.

    Finally, I've scoured the internet to see if anyone else has working
    implementations. I found a couple of demos that run under web start. One of
    my browsers under (64-bit Debian) Linux handles this and the demo runs but
    it is very slow. However, it is layering both Java2D and OpenGL so maybe it
    is inherently slow. The same demo on my Windows XP box (same hardware) runs
    for a few seconds before hanging.

    Outside Java, OpenGL works flawlessly on both machines and we use it
    regularly in our work (from OCaml). Both machines have the same spec:

    2x 4400+ Athlon64
    2Gb RAM
    GeForce 7900GT 512Mb

    This raises several questions for me that I've had trouble getting answers
    to:

    1. If I want to do high-performance real-time interactive 2D and 3D graphics
    and port our OpenGL-based libraries to the Java platform for others to use,
    is JOGL the right library for me?

    2. How many people actually have a working JOGL development environment, so
    they can compile OpenGL applications written in Java?

    3. How reliable is JOGL? Is it viable to use JOGL for commercial work or is
    it too unstable in practice?

    I have found some alternatives like the NetBeans OpenGL project but it has
    zero users. I believe JOGL is supported by Sun so I assume it is the
    defacto-standard for this kind of work but I'd like some reassurance...

    Many thanks,
    --
    Dr Jon D Harrop, Flying Frog Consultancy
    http://www.ffconsultancy.com/products/?u
     
    Jon Harrop, Oct 10, 2007
    #5
  6. Jon Harrop

    Michael Jung Guest

    Jon Harrop <> writes:
    > Tris Orendorff wrote:
    > > Jon Harrop <> burped up warm pablum in
    > > news::
    > >> Anyone managed to get JOGL working under AMD64 Debian?

    > > Only with Nvidia video cards and their *sinful* binary drivers. ATI is a
    > > lost cause when it comes to 3-d drivers.

    > That's fine, we only use nVidia cards anyway. But I'm having a hell of a job
    > getting JOGL to work. I tried getting the latest builds of JOGL and the
    > JOGL demos but I got:
    > $ cd jogl-demos
    > $ java -cp build/jogl-demos.jar demos.gears.Gears
    > Exception in thread "main" java.lang.NoClassDefFoundError:
    > javax/media/opengl/GLEventListener
    > at java.lang.ClassLoader.defineClass1(Native Method)
    > at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    > at
    > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    > at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    > at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    > at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    > at java.security.AccessController.doPrivileged(Native Method)
    > at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    > at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    > at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)


    This seems to be a classic classpath problem. Probably the basic jogl jars
    are not in the system class path, so you would have to specify them
    explicitly. Also make sure that the native libs are in the library
    path. Otherwise, this is going to be your next problem.

    > So I tried getting a coherent distribution from the latest stable releases
    > (jogl-1.1.1-rc3) but I still get the same error. I've tried recompiling the
    > whole thing from scratch and still get the same error.


    The thing is that you specify "java -cp build/jogl-demos.jar", and I assume
    that the proper jogl jars aren't in the demos and they're not in the system
    jar folder.

    > Finally, I've scoured the internet to see if anyone else has working
    > implementations. I found a couple of demos that run under web start. One of
    > my browsers under (64-bit Debian) Linux handles this and the demo runs but
    > it is very slow. However, it is layering both Java2D and OpenGL so maybe it
    > is inherently slow. The same demo on my Windows XP box (same hardware) runs
    > for a few seconds before hanging.


    Can't tell you what is wrong. I have JOGL running under Linux and WinXP
    without that much hassle. I just followed the instructions. The problems you
    have described so far are nothing specific to your 2 processor architecture or
    64-bit system.

    > 1. If I want to do high-performance real-time interactive 2D and 3D graphics
    > and port our OpenGL-based libraries to the Java platform for others to use,
    > is JOGL the right library for me?


    Haven't checked LWJGL, but the two are the only ones to consider as far as I
    can see. You could write some benchmark and compare the two. There were
    claims that JOGL is within a single digit performance from C. (I currently
    only find a claim to within 15%.)

    > 2. How many people actually have a working JOGL development environment, so
    > they can compile OpenGL applications written in Java?


    I do. I compile on Linux and test also on WinXP, since native code is
    involved. Didn't have any problems.

    > 3. How reliable is JOGL? Is it viable to use JOGL for commercial work or is
    > it too unstable in practice?


    I can't tell. The featured projects and the list of references to code
    suppliers seem to suggest so. I didn't have any stability problems. (I do
    have some weird mouse pointer "loss-of-resolution" problems when opening an
    OpenGL window in X11. I haven't come around to checking why this is so.)

    Michael
     
    Michael Jung, Oct 10, 2007
    #6
  7. Jon Harrop

    Jon Harrop Guest

    Michael Jung wrote:

    > Jon Harrop <> writes:
    >> Tris Orendorff wrote:
    >> > Jon Harrop <> burped up warm pablum in
    >> > news::
    >> >> Anyone managed to get JOGL working under AMD64 Debian?
    >> > Only with Nvidia video cards and their *sinful* binary drivers. ATI is
    >> > a lost cause when it comes to 3-d drivers.

    >> That's fine, we only use nVidia cards anyway. But I'm having a hell of a
    >> job getting JOGL to work. I tried getting the latest builds of JOGL and
    >> the JOGL demos but I got:
    >> $ cd jogl-demos
    >> $ java -cp build/jogl-demos.jar demos.gears.Gears
    >> Exception in thread "main" java.lang.NoClassDefFoundError:
    >> javax/media/opengl/GLEventListener
    >> at java.lang.ClassLoader.defineClass1(Native Method)
    >> at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    >> at
    >> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    >> at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    >> at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    >> at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    >> at java.security.AccessController.doPrivileged(Native Method)
    >> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    >> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    >> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    >> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    >> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

    >
    > This seems to be a classic classpath problem. Probably the basic jogl
    > jars are not in the system class path, so you would have to specify them
    > explicitly. Also make sure that the native libs are in the library
    > path. Otherwise, this is going to be your next problem.


    Yes indeed! I posted on c.l.java.help and they explained that you cannot
    pass jars using several -cp arguments, you must use a different syntax for
    passing the classpath on command line:

    java -cp ../jogl/build/jogl.jar:../gluegen/build/gluegen-rt.jar:build/jogl-demos.jar
    demos.gears.Gears

    As you say, I have to setup my LD_LIBRARY_PATH first to find the native code
    DLLs:

    export
    LD_LIBRARY_PATH="/home/jdh30/src/jogl/build/obj/:/home/jdh30/src/gluegen/build/obj/"

    and then the whole thing works!

    Thanks to everyone for their help.

    >> So I tried getting a coherent distribution from the latest stable
    >> releases (jogl-1.1.1-rc3) but I still get the same error. I've tried
    >> recompiling the whole thing from scratch and still get the same error.

    >
    > The thing is that you specify "java -cp build/jogl-demos.jar", and I
    > assume that the proper jogl jars aren't in the demos and they're not in
    > the system jar folder.


    Yes, there are other requires jars in ../jogl/build and ../gluegen/build but
    even if you reference them like this:

    java -cp ../jogl/build/jogl.jar -cp ../gluegen/build/gluegen-rt.jar -cp
    build/jogl-demos.jar demos.gears.Gears

    it still doesn't work.

    Perhaps the best solution is to set the CLASSPATH environment variable and
    give absolute paths to the jar files:

    export
    CLASSPATH=/home/jdh30/src/jogl/build/jogl.jar:/home/jdh30/src/gluegen/build/gluegen-rt.jar:/home/jdh30/src/jogl-demos/build/jogl-demos.jar

    Note that you must give absolute paths to the jar files themselves and not
    just the directory they reside in (which is one of the things I was doing
    wrong before).

    >> 1. If I want to do high-performance real-time interactive 2D and 3D
    >> graphics and port our OpenGL-based libraries to the Java platform for
    >> others to use, is JOGL the right library for me?

    >
    > Haven't checked LWJGL, but the two are the only ones to consider as far as
    > I
    > can see. You could write some benchmark and compare the two. There were
    > claims that JOGL is within a single digit performance from C. (I currently
    > only find a claim to within 15%.)


    Great, thank you. I'm really only interested in reliability at this point
    and it looks like JOGL is the defacto standard, so I'll stick with it.

    >> 3. How reliable is JOGL? Is it viable to use JOGL for commercial work or
    >> is it too unstable in practice?

    >
    > I can't tell. The featured projects and the list of references to code
    > suppliers seem to suggest so. I didn't have any stability problems. (I
    > do have some weird mouse pointer "loss-of-resolution" problems when
    > opening an
    > OpenGL window in X11. I haven't come around to checking why this is so.)


    Ok. I'll give it a go and see what I come up with. I'll also blog exactly
    what I had to do to get it working.

    Many thanks for all your help.

    --
    Dr Jon D Harrop, Flying Frog Consultancy
    http://www.ffconsultancy.com/products/?u
     
    Jon Harrop, Oct 11, 2007
    #7
  8. Jon Harrop

    Michael Jung Guest

    Jon Harrop <> writes:
    > Michael Jung wrote:


    > java -cp ../jogl/build/jogl.jar -cp ../gluegen/build/gluegen-rt.jar -cp
    > build/jogl-demos.jar demos.gears.Gears


    Use colon separators instead of multiple classpath options.

    > Perhaps the best solution is to set the CLASSPATH environment variable and
    > give absolute paths to the jar files:


    > export
    > CLASSPATH=/home/jdh30/src/jogl/build/jogl.jar:/home/jdh30/src/gluegen/build/gluegen-rt.jar:/home/jdh30/src/jogl-demos/build/jogl-demos.jar


    Your choice. In some situation this obscures things.

    Michael
     
    Michael Jung, Oct 13, 2007
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bura Tino

    gl4java or jogl?

    Bura Tino, Jul 1, 2003, in forum: Java
    Replies:
    13
    Views:
    5,206
    Peter Ashford
    Jul 4, 2003
  2. Olaf Kliche

    [JOGL] - small webstar test

    Olaf Kliche, Apr 13, 2004, in forum: Java
    Replies:
    0
    Views:
    599
    Olaf Kliche
    Apr 13, 2004
  3. Reza Roby

    JOGL too slow

    Reza Roby, May 7, 2004, in forum: Java
    Replies:
    10
    Views:
    3,435
    Roedy Green
    May 9, 2004
  4. Reza Roby

    JOGL too slow

    Reza Roby, May 7, 2004, in forum: Java
    Replies:
    1
    Views:
    508
    Vincent Cantin
    Jun 24, 2004
  5. Andrew Thompson

    JWS/JOGL test..

    Andrew Thompson, Oct 14, 2005, in forum: Java
    Replies:
    21
    Views:
    1,109
    Andrew Thompson
    Oct 15, 2005
Loading...

Share This Page