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:\Documents and
Settings\rm\JavaLibrary2\build\classes
D:\Documents and Settings\rm\JavaLibrary2\src\JavaRenderer.java:1: package
javax.media.opengl does not exist
import javax.media.opengl.GL;
D:\Documents and Settings\rm\JavaLibrary2\src\JavaRenderer.java:2: package
javax.media.opengl does not exist
import javax.media.opengl.GLEventListener;
D:\Documents and Settings\rm\JavaLibrary2\src\JavaRenderer.java:3: package
javax.media.opengl does not exist
import javax.media.opengl.GLAutoDrawable;
D:\Documents and Settings\rm\JavaLibrary2\src\JavaRenderer.java:4: package
javax.media.opengl.glu does not exist
import javax.media.opengl.glu.GLU;
D:\Documents and Settings\rm\JavaLibrary2\src\JavaRenderer.java:10: cannot
find symbol
symbol: class GLEventListener
public class JavaRenderer implements GLEventListener
5 errors
BUILD FAILED (total time: 0 seconds)
There's obviously something I've missed - can anyone help?
> There's obviously something I've missed - can anyone help?
JOGL isn't part of the core Java SDK. You've to install it
additionally. Follow the instructions on the JOGL homepage how
to install it into your SDK installation.
Wolfgang Draxinger
--
E-Mail address works, Jabber: hexa...@jabber.org, ICQ: 134682867
[...]
>
> 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
import 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;
import 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.
Thanks - but that's precisely what I've done and it's not working.
"lk" <gofy...@wrong.address.com> wrote in message
news:4879b85c$0$26088$db0f...@news.zen.co.uk...
The jogl jars aren't in your $CLASSPATH
Add them. You'll need to add the DLL's to your $PATH to run, also.
jbw
You can get the plugin using the plugin manager in NetBeans 6. Here
are some links in case you can't get that to work.
http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=3260
https://netbeans-opengl-pack.dev.java.net/
http://blogs.sun.com/jonasdias/entry/developing_opengl_with_netbeans_6
Cheers,
Mike
Thanks. Thus far, I've put:
jogl.dll in wherever\bin\
jogl.jar in wherever\lib\ext
and amended $CLASSPATH and $PATH but NetBeans (admittedly 4.1) has refused
to play ball. I'm forced to use NetBeans 4.1 thanks to my course.
However I do have another box I can install NB6 on so I'll see if that
works.
Just to comfirm what you ought to be doing (you appear to be doing
this but I'm just checking):
* native libraries must be located in the path defined by the Java
system property "java.library.path". This should include your $PATH
(or %PATH% for those unlucky enough to be using Windows). The native
libraries (DLLs, or *.so) must be located somewhere on this path.
* the JAR file must be located on the Java classpath.
You can view this property with the following program (which must be
contained in a file called "CheckPaths.java"):
public class CheckPaths {
public static void main(String[] args) {
System.out.println("java.library.path = " +
System.getProperty("java.library.path"));
System.out.println("java.class.path = " +
System.getProperty("java.class.path"));
}
}
--------
lk: Wrote