Little help needed

Well as i can get jogl to work with jbuilder. I downloaded another sdk with netbeans. I have started a new application in NB and compiled that. Everything seems fine.
If i add the line System.loadLibrary(“jogl”); it gives the error specified in one of the stickies, UnsatisfiedLinkException.
What do i need to do to the java.library.path do correct this.
I have added the jogl.jar to de lib/ext directory and i added jogl.dll to the bin directory.

thank you very much

btw i would also like to use JOAL and JInput. Do i need to do the same stuff with them as i did with JOGL?

I am experiencing that simply being able to compile a program wich is using jogl is harder the programming some game.
Why is it so hard to simply get jogl working? I shouldnt be more then placing a few files in the proper directories. But it isnt. And there is no documentation on what to do. I think this is ridiculous and extremly annoying.
Why cant someone just tell me exactrly what they did to be able to compile a program with jogl on jbuilder, netbeans or whatever…

I am not sure about NB because I use Eclipse, but here is what I did in Eclipse (if memory serves):

  • create dir c:\jogl
  • Unzip to JOGL to it
  • Create a new project in Eclipse
  • Right click on the project name, select the “Properties” menu item
  • Select Java Build Path
  • Select the Libraries Tab
  • Click Add External Jars
  • Navigate the file dialog to C:\jogl
  • Hold ctrl and select both the jogl.jar and jogl-natives-win32.jar
  • OK to accept

You should now be able to compile and execute in Eclipse.

If not, try copying the jogl.dll and jogl_cg.dll (if you need it) to your project directory (the one you made above…default is like: c:\eclipse\workspace\myproject or something like that)

… try building something

You could create a project from the demos and then do that step also to have something to execute.

Here go the instructions for NetBeans 4.x:

  • Create dir “C:\jogl”
  • Copy the jogl.jar from the binary distribution to it
  • Unzip “jogl-natives-win32.jar” to it

You should now have

C:
… jogl
… jogl.jar
… jogl.dll
… jogl_cg.dll

  • Create a new project in NetBeans (“Java Application”)
  • Right click on the project name, select the “Properties” menu item
  • Select the “Libraries” Item on the left
  • Click [Add Jar/Folder]
  • Navigate the file dialog to “C:\jogl”
  • Select the “jogl.jar” and confirm the file dialog
  • Select the “Run” Item on the left
  • enter “-Djava.library.path=C:\jogl” in the textfield reading “VM Options”
  • click [OK]

now you have set up the environment, add the two classes described in the third post of the “How to: Getting started with JOGL” Thread in this forum to your project to get started.

Thats it, no black magic involved…

You should be able to reproduce the steps for JBuilder yourself. Basically it boils down to "add the jogl.jar as library to your project and point the “java.library.path” property to the path with your “jogl.dll”.

Maybe you should pick a better directory than “C:\jogl”, e.g “C:\dev\javalibs\gamecore” and add the jinput an joal jars and dlls, too.

That wasnt that hard afterall. Thank you very much. I was able to compile the example in the getting started thread, although i got the following message:
Note: D:\Java\Projects\Test2\src\test2\Main.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

What does that mean?

tnx

You must be using JDK 1.5, which deprecate the show() method for JFrame…

Try to add the -Xlint:deprecation argument (in the VM option textfield) to see it clearly.

I did that but it doesnt recognise -Xlint:deprecation

You have to specify it for the compile-process, so it is not intended for the “VM-Options”-textfield.

Instead locate the “Compiling”-item in the project properties (right click on the project name -> “Properties”, open the “Build” item on the left, click “Compiling” beneath) and add “-Xlint:deprecation” to the “Additional Compiler Options”-textfield.

This is the message i get:
Compiling 2 source files to D:\Java\Projects\Test2\build\classes
D:\Java\Projects\Test2\src\test2\Main.java:35: warning: [deprecation] show() in java.awt.Window has been deprecated
testFrame.show();
1 warning

This is a deprecation warning. It means, that the method “show()” should not be used anymore. A method can be marked as deprecated by specifying "@deprecating " in javadoc. The description mostly contains the reason for the deprecation and the replacement method to use. Just point your cursor over the “show()” call and press CTRL-SHIFT-Space to trigger the Javadoc-Popup in Netbeans.