Installing JOGL

So I have been programming java for 3-4 years and me and my friend are trying to get an online game going.
We have the networking part set up, and we wanted to try using OpenGL instead of swing.

I have tried to follow every tutorial I can find off of google, and for some reason it doenst work.
I have the library files set up correctly, and it can load the DLL files.

JOGL,jar is in the project, and the import import net.java.games.jogl.*; always says it cannot find the net package.
The JOGL.jar file has a bunch of com.sun.openGL and com.sun.media packages in it, but no net package.

Some of the same classes that the tutorials use are in the com.sun stuff, but it makes me think I am using the wrong version of JOGL?
Also if it it of any use, I am using the eclipse IDE.

Any help is appreciated.

ya, ya, ya, jogl is always a bitch to set up, but when you do end up getting it working, its amazing.

What you may have to do:

1.) make sure its in build path of project (You implied this, so were good)
2.) Go to the “Run…” option in eclipse (top of window) and add to the Arguments tab the VM argument -Djava.library.path=—LOCATION OF LIBRARY DIRECTORY—

If it still doesnt work, right click My Computer, go to Advanced, go to Environmental Variables, go to Path, go to Edit, APPEND on to the end of the line --LOCATION OF LIBRARY DIRECTORY-- and a SEMICOLON

soo… ya

jogl is a bitch to install :stuck_out_tongue:

I was under the impression that the path only mattered when you actually tried to run compild code?

By adding a VM argument at runetime doesnt help my code compile. And its a compile issue I am having.

Screenshot of my workspace in eclipse to show what I mean.
http://67.160.19.184/jogl.JPG

The main issue is the “net import cannot be resolved”

The only thing I can think of is that I am ether using the wrong jogl.jar or I messed up is importing it into my workspace.

CTRL+SHIFT+O, my friend. Save afterwords too.

I am still unsure that I have the correct jogl.jar

When I organize imports, it says im missing some inherited abstact methods and im using some methods of classes that are undefined.

The code is from a tutorial on this forum by the way. I dont understand why the net import wont work for me like it does for everyone else.
Every tutorial has at the top “import net.java.games.jogl.*;” So why is it that my jogl.jar does not have this package? Where should I go to get the correct jar that has this package because the jar from the jogl home page doesn’t have it.

Right so apparently…

I got my jogl.jar from here: https://jogl.dev.java.net/
instead of here:https://games-binaries.dev.java.net/build/index.html

and it was the incorrect jogl.jar as I was thinking initally.

Thank you guys for replying and helping me.
just a questions, whats the jogl.jar with the com.sun packages for? It is just a different version or type?

ooh I think I’ve seen that before. The fact that “games” is in the import list implies that you’re using tutorials based on some weird build of jogl XD

get the build by google searching JOGL and doing the first link.

POINT BEING, you’re reading tutorials on builds of jogl that are convenienced for games, and I havent ever been able to find those :stuck_out_tongue:

I’ll stick with my vanilla build.

can’t help you, man.

Your tutorials refer to the old version of JOGL prior to the JSR implementation. The correct import now is javax.media.opengl.* Just look into the official demo sources (download is last link on this page), copy the Gears.java as a boilerplate and continue from there. For correct deployment, see the JOGL User’s Guide. If you are doing the NeHe Tutorials, there is a JOGL port of the lessons. If you are using Netbeans, just install my project template module :wink:

If you want more info on what has changed between the “old” JOGL and the JSR implementation, take a look at this thread