Jogl installation of binary files

I found the binaries for win32
in the https://jogl.dev.java.net/servlets/ProjectDocumentList
/september5
How can I put those files in the java directory.
I have a source from this site.
The compile error is
“package net.java.games.util does not exist”

Thank you for your comments.

I warn you…this is most likely going to be a crappy answer since I am certainly no expert. As a matter of fact, you could call me a newbie :slight_smile: Maybe someone will be able to chime in to clarify what I’m going to say.

Anyway…I’ll give it a shot.

The error is caused by the fact that the compiler can’t locate the necessary jogl files while trying to gather everything it needs. Being only a machine, you have to tell the blasted thing exactly where to find the jogl files it needs, and those files live in the jogl.jar you unpacked from your download. So…the short answer is you need to add the jogl.jar to your classpath.

In my IDE you go to the ‘project’ tab, ‘project settings’, ‘required libraries’, ‘new’, ‘add’, ‘path or archive’. NOW…when you click on the ‘add archive’ it puts up a file chooser dialog, and you just navigate to the folder where you have the jogl.jar stored and select it. After all this, the IDE will require you to give what you just did a name so that you can select it in the future without having to redo all this. Let’s say you name it ‘path_to_jogl.jar’. Now that name will appear in your ‘project/ project settings/ required libraries’ window. Before you try to compile the project, make sure you select that item, or it STILL won’t be able to find the files.

Then, when you try to run the program you just successfully compiled, you’ll get more errors unless you tell the IDE where to find the two .dll’s you unpacked with your download. Again, in my IDE, you go to ‘project, project settings, JDK Tools, run application, new’. Then there is a window where you can type in parameters to alter the runtime configuration. In other words, when it runs the program, it needs to know where to find the .dll’s so that it can deal with the native calls needed by your program. On my IDE I type in the following in the ‘add parameters’ window:

-Djava.library.path=C:\jogl-win32 -classpath “$[ClassPath]” $[JavaClass]

where C:\jogl-win32 is the location of both .dll’s.

OK…that’s it. As I said, perhaps others will be willing to correct me / assist you if you have more questions on this topic :wink:

Good luck sir.

I am seeing the same issue.
piyo, did you get this resolved?
I’m trying everything.

I have everything else working, I can run pretty much every Nehe port, except the Nehe31, where it errors on the
import net.java.games.util.*;

“The import cannot be resolved”.

I’m using Eclipse on Windows 2K.
Any specific suggestions?

thanks!

I am using
NetBeans IDE v 3.5.1 with J2SE v 1.4.2 COBUNDLE.
I can’t solve the problems.
I tried to move .jar to every path.
It just do not work .
thanks.

Might anyone have any suggestions to our problem above? I too have tried everything.

I see that there is this file…
jogl-demos-util.jar,
and when I open it with Winzip I see the TGAImage.class

And I know this is what it’s trying to reach with the call…
TGAImage texLoader = null;

The import I’m guessing that is looking for this is…
import net.java.games.util.*;

I’ve tried everything. I would have thought sticking it in the C:\j2sdk1.4.1_02\jre\lib\ext directory would do it, but not working :frowning:

I just can’t put 1 and 1 together and get this to work.
???

Thanks in advance for any help!!!

GOT IT!!!

Piyo123, not sure if your IDE works like Eclipse did, but I was able to get it to work using this import…

import demos.util.TGAImage;

I’m not sure at what point this became available, but when I clicked on the X error icon next to the import in Eclipse it made this suggestion. So I did it an waalaa.
I’m guessing it was after I referenced the jogl-demos-util.jar.

So I’m thinking something similar in NetBeans would work.

Good Luck!

BMan

copy jogl.jar into the following two directories:

  1. j2sdk directory/jre/lib/ext
  2. program files/java/j2re/lib/ext
    copy jogl.dll and jogl_cg.dll into the following two directories:
  3. j2sdk directory/jre/bin
  4. program files/java/j2re/bin
    this way i compile & run jogl demos.i hope this helps

Thanks you everybody.
I succeeded now to run jogl code,
after copying as you said.

Good luck for all.