Installation queries

Hi all,

I realise there’s an installation thread at the top of this forum; unfortunately I’m a bit too inexperienced/dumb to understand some of it. I have a (very) little bit of Java experience (compiling relatively simple programs with Textpad) and now find myself needing to learn jogl ASAP. I feel a bit like a learner driver who’s been given the keys to a fighter jet so if you can help at all, the more simply-worded your responses, the more likely I am to understand. Don’t worry about the possibility of patronising me - I don’t think that’s possible!

I downloaded jogl-1.1.0-b04-bin-windows (I’m using Windows XP and NetBeans IDE 3.6, did I choose the right download?) and then tried to interpret the installation instructions in the aforementioned thread as best I could.

So, to “install the jogl.jar file in the classpath of your build environment” I added my newly downloaded jogl.jar to the “JAR execution classpath” through NetBeans. Was this what I was supposed to do?

Finally, I need to do the “installation of the native library”. The advice is as follows, and at this point I get totally lost:

"Java loads native libraries from the directories listed in the java.library.path environment variable. Best to just print this out and put the native library into one of these directories. One of these directories is likely to be the extension (ext) directory of the JRE for your IDE. Unless you only want to run the application from inside the IDE, don’t install it here. "

I run the suggested System.loadLibrary(“jogl”); statement and, predictably, get an UnsatisfiedLinkError. If anyone can explain to me, in the most basic terms possible, what I’m supposed to do to be able to write, compile and run jogl programs with my setup, I would be eternally grateful.

I realise that my queries are hugely below the level of expertise of other questions on this forum, and I’m sorry if this is a waste of everyone’s time. Unfortunately, I can’t seem to find anywhere else that approaches jogl in the kind of “sesame street” way that a total novice at this sort of thing requires.

Many thanks in advance,
And The No

Hi,

Java library path is the path where native libraries used by the jvm are stored.

With netbeans 3.6 you have to access the advanced properties tab for the execution of your project and add :

“-Djava.library.path=[path_to_your_dll]” , it should work.

By the way, moving to Netbeans 4.0 will mean another trick…

And you should definitivly used that last jogl’s binaries 1.1b10.

Hope it helps.

Thanks very much for the reply.

1)How do I find out the path to my dll?

  1. Where do I find the advanced properties tab?

Please forgive my ignorance :slight_smile:

Sorry, have found jogl.dll (I assume this is the path I need).

The problem is I don’t now know what to do with this. In NetBeans 3.6, under the JAR execution options (where I added my jar file to the Classpath), there’s a “Library Path” field which I assume is what I need, only it’s not editable.

Once again, all advice much appreciated.

Right, sorry about all the posts (and replying to myself), but I can clarify the situation a bit further now.

I did System.out.println( System.getProperty(“java.library.path”) ); and found a load of directories. By copying the file jogl.dll into one such (random) directory, I was then able to run the line System.loadLibrary(“jogl”); that had previously given me the UnsatisfiedLinkError, and I now get no such error.

All fine and dandy except that now when I try and compile the Test and TestRenderer programs provided in the startup example, NetBeans says that package net.java.games.jogl.*; does not exist.

So how do I get NetBeans to recognise the package? What step did I do incorrectly, the inclusion of jogl.jar, the inclusion of jogl.dll or both?

Please help, I’m so lost/confused!!!

Well, I think that all you have to do know is to mount he jogl.jar file into Netbeans, it should be added automaticaly when your launch your application from the IDE.

Sorry, I know I’m being really dense but I don’t get how to mount the jar file (other than by trying to add it to the “JAR execution classpath” as previously described.

I can’t launch my application because it won’t compile because it doesn’t recognise package net.java.games.jogl.*;

Please don’t give up on me, I really need and appreciate the help!!

Well, if i remember well you have a menu (may be ‘File’ ) and a mount… command in this menu, choose ‘mount libray’ and select your jogl.jar, it should, it must!, work…

Let me know…

Success!!! Thank you so much for your help. I found a little file called JOGL in the filesystem tab and was able to right-click it and select “Mount JAR”. And now I’ve got my little red triangle.

Unfortunately, I now somehow need to make a virtual 3D landscape. Small steps…!

“A one thousand kilometers trip always begin with a first step” (Lao-Tseu)

Indeed! One more question though. I installed jogl-1.1.0-b04-bin-windows because it was the only remotely suitable thing I could find on this page:

https://games-binaries.dev.java.net/build/index.html#release

Where might I acquire 1.1b10?

right here:

https://jogl.dev.java.net/servlets/ProjectDocumentList?folderID=2869&expandFolder=2869&folderID=2771

I didn’t even know that other page existed, bit of a communication breakdown or something I presume.

D.

-edit- sorry that URL is a bit mangled, heres the URL for the actualy project page:

https://jogl.dev.java.net/servlets/ProjectDocumentList

-edit-

Ah yes, this is a bit confusing, I wonder myself why the “games-binaries” are so out of date, you have to go to the jogl-projects page instead and to the right there is a link to download the latest builds,
for your convenience:
https://jogl.dev.java.net/servlets/ProjectDocumentList?expandFolder=2771

// gregof

Thanks fellas. So what do I do, just download the jogl.jar file and “mount jar” as before? Do I need to somehow uninstall the old version or something?

well its probably a good idea to delete the old Jars and DLLs from your system to avoid any possible unpleasantness. Just replace the old ones with the new ones and you should be fine. Never used any recent version of NetBeans so I don’t know if it stores meta information about any Jars you ‘mount’ so you might be best off unmounting the old one and remounting the new one or something.

D.

new dlls? the only ones i can find are in the 2003 download folder ???

[quote]new dlls? the only ones i can find are in the 2003 download folder ???
[/quote]
They’re in the same place as JOGL.jar. In the case of windows for example, grab the jogl-natives-win32.jar and unzip it, the DLLs are zipped up inside.

D.

cheers daire

doh, i don’t always immediately think ‘UNZIP!’ when i see a jar file. silly me :-[

Indeed. That last step had me baffled for about an hour. I realized that the java.library.path was coming from my system path, but I could not get the dll’s loaded. Then I unjarred the native jar, and whammo! That step ought to be mentioned somewhere for us not used to working with native libraries and java.
Just a thought.

Funny thing is, I read something about a patch for b9 that enabled the ability of loading the required libraries from within jar files. i.e. so you could just place the jogl-native-win32.jar file in the jre/lib/ext directory instead of extracting it to the jre/bin directory. I tried this, but it didn’t work. Did i misinterpre the patch or is it not in yet?