JOGL-1_0_0 installation problems

Hello!

I know this has been addressed before in here, ive tried doing everything listed in these posts to get it working, but non seem to help.
Ive also checked over the internet for anything to get it working, however that doesnt help either.

Im running:

Windows XP Proffesional SP2

Heres what i have installed:

jdk 1.6.0
jre 1.6.0
jogl-1_0_0-windows-i586

These are all located in my C:/Java/ directory. Ive set the classpath to point to this area, and doesnt work, i get 15 errors.


JGears.java:12: package javax.media.opengl does not exist
import javax.media.opengl.*;
^
JGears.java:13: package com.sun.opengl.util does not exist
import com.sun.opengl.util.*;
^
JGears.java:14: package demos.gears does not exist
import demos.gears.Gears;
                  ^
JGears.java:23: cannot find symbol
symbol: class GLJPanel
public class JGears extends GLJPanel {
                            ^
JGears.java:24: cannot find symbol
symbol  : class GLCapabilities
location: class demos.jgears.JGears
  private static GLCapabilities caps;
                 ^
JGears.java:34: cannot find symbol
symbol  : class GLCapabilities
location: class demos.jgears.JGears
    caps = new GLCapabilities();
               ^
JGears.java:40: cannot find symbol
symbol  : class Gears
location: class demos.jgears.JGears
    addGLEventListener(new Gears());
                           ^
JGears.java:56: cannot find symbol
symbol  : variable super
location: class demos.jgears.JGears
    super.paintComponent(g);
    ^
JGears.java:71: cannot find symbol
symbol  : method getWidth()
location: class demos.jgears.JGears
      g.drawString("FPS: " + format.format(fps), getWidth() - 140, getHeight() -
 30);
                                                 ^
JGears.java:71: cannot find symbol
symbol  : method getHeight()
location: class demos.jgears.JGears
      g.drawString("FPS: " + format.format(fps), getWidth() - 140, getHeight() -
 30);
                                                                   ^
JGears.java:76: cannot find symbol
symbol  : method getHeight()
location: class demos.jgears.JGears
      g.drawImage(javaImage, sp, getHeight() - javaImage.getHeight() - sp, null)
;
                                 ^
JGears.java:78: cannot find symbol
symbol  : method getHeight()
location: class demos.jgears.JGears
        g.drawImage(openglImage, sp + javaImage.getWidth() + sp, getHeight() - o
penglImage.getHeight() - sp, null);
                                                                 ^
JGears.java:110: cannot find symbol
symbol  : class GLJPanel
location: class demos.jgears.JGears
    final GLJPanel drawable = new JGears();
          ^
JGears.java:126: cannot find symbol
symbol  : class Animator
location: class demos.jgears.JGears
    final Animator animator = new Animator(drawable);
          ^
JGears.java:126: cannot find symbol
symbol  : class Animator
location: class demos.jgears.JGears
    final Animator animator = new Animator(drawable);
                                  ^
Note: JGears.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
15 errors

I have tried putting the jogl.jar files in with JRE lib files, as well as adding the dlls to the JDK/bin folder, however these didnt seem to work. Then after following some instructions here i removed everything ive installed and do it again from scratch making sure they are all in their own folders, which they were originally anyway.

I also found this in the installation notes that come with “jogl-1_0_0-windows-i586.zip”

[quote]If you are developing a new application which uses JOGL, download both jogl.jar and the appropriate native library jar file (for example, jogl-natives-win32.jar). It is recommended to place both of these jar files in the same directory.
[/quote]
However looked everywhere on the JOGL main page and couldnt find this “jogl-natives-win32.jar” file anywhere, thinking this was a problem downloaded it from another site and added it into the directory with jogl.jar and still no luck.

Im pretty much out of ideas and posting here as a last resort, so its not like im lazy and havent tried to get it running myself or looked around, sorry if this is answered somewhere else… i couldn’t find it.

Hope someone can help me!

Please be more specific in what you did:

  • how do you set up the classpath
  • how do you compile
  • do you use an IDE

[quote]However looked everywhere on the JOGL main page and couldnt find this “jogl-natives-win32.jar” file anywhere, thinking this was a problem downloaded it from another site and added it into the directory with jogl.jar and still no luck.
[/quote]
The “jogl-natives-win32.jar” just contains the .dll-files, already contained in the lib directory of your jogl-1_0_0-windows-i586.zip, you don’t need it.

Thats what i thought when i read that it just encapsulates the dll and some manifest files.

[quote]- how do you set up the classpath
[/quote]
Went to the environmental vars within the my comp>properties>advanced, there was no CLASS_PATH var there at the time, so i added one with the following value “C:\Java\jogl-1_0_0-windows-i586\lib\jogl.jar”, no luck with that though, nothing changed. I read that you only need the LD_LIBRARY thingy for running not compiling so i didnt enter that, although i had previously and it made no difference

[quote]- how do you compile
[/quote]
Wrote a little .bat file to compile the code is included below:


path= C:\Java\jdk1.6.0\bin
javac *.java
pause

[quote]- do you use an IDE
[/quote]
Ive installed JBuilder but im not using it at the moment, just using PSPad as i had that installed for other dev work i do.

Let me know if you need any other information and thanks for taking the time out to help!

From your first post, it looks as if you’re trying to compile the demos package. Doesn’t that package already have pre-compiled class files which you can just run?

I was afraid, you would say that :wink: Last time I used the commandline javac is about - 8 years - ago :wink: I would suggest to use an IDE (netbeans and eclipse are mostly used, I think)

Hmm. should have worked. Did you log out after that? The environment variables in windows only get set if you newly log in or restart the desktop.

That’s right, but the LD_LIBRARY var is only available under *nix. Under windows you can add the “C:\Java\jogl-1_0_0-windows-i586\lib” directory to your path.

Anyway, I would discourage placing either jogl.jar or jogl.dll in a global environment, since it could interfere with Java Webstarted applications.

Try:


path= C:\Java\jdk1.6.0\bin
classes=C:\Java\jogl-1_0_0-windows-i586\lib\jogl.jar
javac -classpath %classes% *.java
pause

for compiling and


path= C:\Java\jdk1.6.0\bin
libs=C:\Java\jogl-1_0_0-windows-i586\lib
java -cp %classes% -Djava.library.path=%libs% YourClassName

for starting.

BTW. If you want to tryout netbeans you can use my plugin to get you started with JOGL.

Will go ahead and try these, i will look into Netbeans as i hear that coming up quite often. I havent used Java much before but it looks alot like c# and C++ which i have used for years, so im sorry if im not entirely sure about some of the things you mention.

And im trying to run JGears as that seems to be the simplest example here, and its just got the JGears.java file, i havent seen any other precompiled ones either, but i did download it all as a zip file from somewhere…

Thanks for taking the time out to answer this by the way!

Ok ive tried what you said and i have got things running through the netbean ide, but i cant use any of the examples ive downloaded as they still wont manually build…

At least ive got it up and running now, ive got some questions about using JOGL in applets, but i think i will start a new thread for that, thanks again for your time guys!

Well I don’t know if it will be this easy, but did you literally use CLASS_PATH? Because it should be CLASSPATH without the underscore.

But even so I personally never use the CLASSPATH variable and especially not as a global setting. These days I just use the -classpath (or -cp) option for both java and javac if I need/want to compile manually.

NB: Don’t forget to add the current directory “.” to the classpath otherwise it won’t find the files in the current directory.
So use something like:
javac -cp .;C:\Java\jogl-1_0_0-windows-i586\lib\jogl.jar *.java