missing jar file from JOGL folder

classic Classic list List threaded Threaded
5 messages Options
max
Reply | Threaded
Open this post in threaded view
|

missing jar file from JOGL folder

max
hello,

first of all: I'm new to this, first time working with a big library.
I joined a team that uses the JOGL library.

I thought it was a good idea to request the library files they are using, so we'd be working with the same version.
However, when I try to build the whole thing, I receive an error:
FileNotFoundException
/java/JOGL/gluegen-natives-linux-amd64.jar (No such file or directory)

...plus stack trace etc.

So I had a look and searched the JOGL folder:
/java/JOGL$ ls | grep gluegen

and I get this:

gluegen.jar
gluegen-java-src.zip
gluegen-rt-android.jar
gluegen-rt.jar
gluegen-rt-natives-android-armv6.jar
gluegen-rt-natives-linux-amd64.jar
gluegen-rt-natives-linux-armv6hf.jar
gluegen-rt-natives-linux-armv6.jar
gluegen-rt-natives-linux-i586.jar
gluegen-rt-natives-macosx-universal.jar
gluegen-rt-natives-solaris-amd64.jar
gluegen-rt-natives-solaris-i586.jar
gluegen-rt-natives-windows-amd64.jar
gluegen-rt-natives-windows-i586.jar

It seems I have the "rt" version of the gluegen files, but it wants the non-rt version.

Could somebody please explain to me what this "rt" stuff is all about?
How can I get this thing to build properly?
What am I doing wrong?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: missing jar file from JOGL folder

jmaasing
If you get that error when building it must be something the build script points to that is missing. Probably nothing the forum can help you with since we don't what that script looks like.
max
Reply | Threaded
Open this post in threaded view
|

Re: missing jar file from JOGL folder

max
Well, there is no script that I'm aware of.

The team uses eclipse and they just added the JOGL classes as library and this seems to work for them.
I did the same in a different IDE (jetbrains' IDEA) and I get the error message.
I will check back if there's any build script but considering the project, I highly doubt it.

The fact that it is missing the file that corresponds to my operating system makes me think this is actually working, just missing the required file.

So what are those "rt" files?
Reply | Threaded
Open this post in threaded view
|

Re: missing jar file from JOGL folder

Xerxes Rånby
In reply to this post by max
Please read the deployment documentation
the most common case is described in the deployment, userguide and wiki here:
https://jogamp.org/jogl/doc/deployment/JOGL-DEPLOYMENT.html#NativeJARFiles
https://jogamp.org/jogl/doc/userguide/index.html#automatednativelibraryloading
http://jogamp.org/wiki/index.php/Downloading_and_installing_JOGL

rt = runtime, indicating you want to use them at runtime.
gluegen-rt.jar <- use this at runtime!
gluegen-android.jar <- use this when you perform android builds.
gluegen.jar <- this jar is to be used to let "Gluegen" generate new java glue code using C header files. in your case you shall _not_ add this jar to the CLASSPATH at runtime because then gluegen will try to load the natives using the gluegen prefix instead of the gluegen-rt prefix.


to summarize: when deploying only include the following jar on the classpath
gluegen-rt.jar

..and have the following jars in the same folder:
gluegen-rt-natives-android-armv6.jar
gluegen-rt-natives-linux-amd64.jar
gluegen-rt-natives-linux-armv6hf.jar
gluegen-rt-natives-linux-armv6.jar
gluegen-rt-natives-linux-i586.jar
gluegen-rt-natives-macosx-universal.jar
gluegen-rt-natives-solaris-amd64.jar
gluegen-rt-natives-solaris-i586.jar
gluegen-rt-natives-windows-amd64.jar
gluegen-rt-natives-windows-i586.jar


JogAmp also support some additional types of deployment:

Eclipse is a "special case" because Eclipse adds its own classloader to your executable that can load jars from inside a single jar and other tricks.
Multi-Jar, Fat-Jar, SvgExe, Eclipse (onejar) all described in:
https://jogamp.org/wiki/index.php/JogAmp_JAR_File_Handling
max
Reply | Threaded
Open this post in threaded view
|

Re: missing jar file from JOGL folder

max
Man, I never would have thought that one can put too many jars into a project.
I just added the whole JOGL folder and expected it to work as it contains all files I have.

The naming scheme was pretty obvious (except for the rt stuff), so I did not expect my mistake there.
Excluding gluegen.jar totally got me in the right direction.

I also found this SO:
http://stackoverflow.com/questions/7210194/where-can-i-find-the-package-javax-media-opengl
with its best answer to be helpful.

I reduced my libraries to those two: jogl-all and gluegen-rt
This project additionally required some sound, aka joal.jar.

That's it. I can build this thing now.
Thanks Xerxes, that was one amazingly helpful post.