lk wrote:
> Hi all
>
> Hope someone can help. I'm just getting into Java and I'm interested
in
> using the openGL api. The problem is, despite following the
instructions
> on:
>
> http://www.cs.umd.edu/~meesh/kmconroy/JOGLTutorial/
>
> I can't seem to get NetBeans (the IDE my course insists we use) to
recognise
> jogl.
> This in as much as I'm getting the following errors:
>
> init:
> deps-jar:
> Compiling 1 source file to D:\Do***ents and
> Settings\rm\JavaLibrary2\build\cl*****
> D:\Do***ents and Settings\rm\JavaLibrary2\src\JavaRenderer.java:1:
package
> javax.media.opengl does not exist
[...]
>
> There's obviously something I've missed - can anyone help?
>
>
I sympathise. One of the hardest parts of teaching stuff like this (and
the initial stages learning it) is the initial configuration stage and
getting sys. admins. to set up labs properly. Or, pointing the finger at
myself, writing unambiguous installation and setup instructions for
students :(
It doesn't help that pre-validation software is still floating around
the internet, i.e. pre
im****t javax.media.opengl.*;
A year ago, I installed and setup JOGL on both Linux and Windows. AFAIK,
the helps here helped (but which I cannot remember):
http://www.felixgers.de/teaching/jogl/JOGLInstall.html
On both systems there were tripwires (incidentally contributed to by
multiple Java systems on the Windows system). Another problem was
finding the installation download. OTOH, all this was done in a spirit
of impatience and haste.
Might you consider using command line and javac (compiler command) and
java (interpreter execute command) for /initial/ testing --- just
removes another source of confusion? Find where java and javac are and
put those directories in the path; or simply use the full pathnames:
c:\program ...\java\jdkxyz\bin\javac prog.java
c:\prog.....\bin\java prog
And start the simplest possible test program, something like:
//package com.genedavissoftware.jogl.ch1;
im****t javax.media.opengl.*;
/**
* Testing to see if native and java libraries are installed correctly.
JOGL
* is installed properly only when the 'jogl.jar' and the native library,
* named somthing like 'libjogl.jnilib' or 'jogl.dll', are both
installed.
*
* If the native library is not accessible, this program will throw a
* java.lang.UnsatisfiedLinkError Exception.
*
* If the jar is not installed in the classpath, then this will not even
* compile. It will say something similar to:
* "package net.java.games.jogl does not exist"
*
* When this class compiles and runs without exceptions, you are ready
* to continue with learning JOGL.
*/
public class HelloWorld {
public static void main (String args[]) {
try {
//check for native library
System.loadLibrary("jogl");
System.out.println(
"Hello World! (The native libraries are
installed.)"
);
//check for jogl jar
new GLCapabilities();
System.out.println(
"Hello JOGL! (The jar appears to be
available.)"
);
} catch (Exception e) {
System.out.println(e);
}
}
}
There are unsorted and unfiltered links at:
http://www.jgcampbell.com/links/jogl.html
Andrew Davison's stuff is good, but not totally introductory.
Gene Davis's book may be out of date, but he has placed updated software
/somewhere/.
Best regards,
Jon C.


|