Installation problem (newcomer)

Hi there I am a newcomer to JOGL and am having a few problems getting it to work.

I have put the jogl.jar file in the ‘lib/ext/’ folder and the jogl.dll and jogl_cg.dll files in the ‘bin/’ folder.

I have a program I am using to try and test if my installation was successful which I can get to compile without error but when I try and run the program I get the following error:

java.lang.UnsatisfiedLinkError: C:\j2sdk1.4.2_01\jre\bin\jogl.dll: Can’t find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at HelloWorld.main(HelloWorld.java:6)
Exception in thread “main”


My program is as follows::

import net.java.games.jogl.*;

public class HelloWorld {
public static void main (String args[]) {
try {
System.loadLibrary(“jogl”);
System.out.println(“Hello World! (The native libraries are installed.)”);
GLCapabilities caps = new GLCapabilities();
System.out.println(“Hello JOGL! (The jar appears to be available.)”);
} catch (Exception e) {
System.out.println(e);
}
}
}


I am a bit lost and any help would be greatly appreciated!

Thanks
Paddy

You probably have more than one copy of the jvm installed on your machine. On my machine the sdk jvm is not the one called from the command line or from my web browser. Check c:\program files\java\jre1.4.2 or something like that.

Newcomer I ran into the same issues. By default you are suppose to put the .dll files in the c:\Windows\System32 directory. This will elminate the -Djava.library.path environment requirement.

I even do this and get the same error. When I use NetBeans my program works fine. Using JBuilder, I don’t understand why I am getting the same error you are getting.

If you had any success I would appreciate the help.

C:\j2sdk1.4.2_04\bin\javaw -classpath “C:project\classes;C:\j2sdk1.4.2_04\jre\lib\ext\jogl.jar;C:\j2sdk1.4.2_04\jre\javaws\javaws.jar;C:\j2sdk1.4.2_04\jre\lib\charsets.jar;C:\j2sdk1.4.2_04\jre\lib\ext\dnsns.jar;C:\j2sdk1.4.2_04\jre\lib\ext\ldapsec.jar;C:\j2sdk1.4.2_04\jre\lib\ext\localedata.jar;C:\j2sdk1.4.2_04\jre\lib\ext\sunjce_provider.jar;C:\j2sdk1.4.2_04\jre\lib\im\indicim.jar;C:\j2sdk1.4.2_04\jre\lib\im\thaiim.jar;C:\j2sdk1.4.2_04\jre\lib\jce.jar;C:\j2sdk1.4.2_04\jre\lib\jsse.jar;C:\j2sdk1.4.2_04\jre\lib\plugin.jar;C:\j2sdk1.4.2_04\jre\lib\rt.jar;C:\j2sdk1.4.2_04\jre\lib\sunrsasign.jar;C:\j2sdk1.4.2_04\lib\dt.jar;C:\j2sdk1.4.2_04\lib\htmlconverter.jar;C:\j2sdk1.4.2_04\lib\tools.jar” HelloWorld
java.lang.UnsatisfiedLinkError: C:\WINDOWS\SYSTEM32\jogl.dll: Can’t find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1485)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at HelloWorld.main(HelloWorld.java:6)
Exception in thread “main”

I am also experiencing this problem using JBUILDER X and JBUILDER 9 can somebody help us here!!

It seems that java is looking for the file jawt.dll but this file is already in the jre\bin directory

Can you try to put the jogl dlls into jre\bin directory too…

Or set the -Djava.library.path, it’s the better way for me… But it’s a matter of personnal philosophy

Ah, was about to post something similar, but different platform: OS X on iBook…

Have dropped the file libjogl.jnilib into the /Library/Java/Extensions directory. (equivalent of /jre/bin or lib/ext, I think).

My stuff fails.

Tried Kev’s JWS spaceinvaders, that throws the same error, namely:


dyld: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.1/Home/bin/java can't open library: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/libjawt.dylib  (No such file or directory, errno = 2)

The JWS stuff failing confuses me. I was just going to use the -Djava.librblahblah but would prefer to see JWS working too.

thanks for your time,

JohnG

What version of OSX have you got? Its also interesting that your 1.4.1 java is accessing 1.4.2 AWT libs :slight_smile:

Kev

OSX 10.3.2

Could be macos jogl was compiled in 1.4.2 ?

Currently, I have jdk 1.4.1_01. Will attempt to hijack connection and d/l 1.4.2.

ANybody here know how to install jogl in JBUILDER?

Upgraded to OSX 10.3.5 and JDK1.4.2_05 and JOGL (and SpaceInvaders) works fine.

Anyway to guard against this kind of thing when using JWS? Spose you have to specify the JDK version?

Cheers,

JohnG

P.S.
After my own foolishness I’m clearly not the one to answer the above post, but maybe drop the native part of JOGL into the JAVA_HOME/jre/lib/ext directory (or equivalent), then include the jogl.jar into your JBuilder project?

It seems that java is looking for the file awt.dll or jawt.dll when i run the my test java program that contains only this line

try{…
System.loadLibrary(“jogl”);
catch…

then it flags an error that awt/jawt.dll is not found

I even try this in the command line

You can specify arguments for the JVM in JBuilder, so trying the not loved, but useful, -Djava.library.path=… can maybe tell you where the pb come from.

And try to add to this path the {$jdk}\jre\bin

im used to using IDE (JBUILDER)
can you just teach me what to specify in -Djava.library path? :slight_smile:

Hi
You need to specify the directory in which your native libs are, like: -Djava.library path=“libs_dir/”, you do that in “project settings” under “run” and “vm-parameters” (or something like that, I’m at work and we dont have jbuilder here.) I use jbuilder at home and I have a directory in the root of my jbuilder-projekt called “libs” and in that directory i place jogl.jar and the jogl.dll (or whatever platform specific native you have). I also point jbuilder to this directory to find the jogl.jar and this way I dont have to pollute my jre/jdk’s lib/ext and bin dirs with jogl-files. This is IMHO the best way to do it, as it keeps things clean and tidy :slight_smile:

// Gregof

I found the solution to MY PROBLEM i just want this to share to you guys
INSTALLING JBUILDER
aside from copying the 2 dll from the the jar file i also copy jawt.dll and awt.dll to system32 directory and it works

I could only get this working some how with NetBeans, not JBuilder or command line.

Moving the jawt.dll and awt.dll did the trick. The world thanks you. Again you are the man. :wink:

can somebody illustrate on how to create gameloop in JOGL?

the one that call the draw function inside the gameloop
:slight_smile:

[quote]can somebody illustrate on how to create gameloop in JOGL?

the one that call the draw function inside the gameloop
:slight_smile:
[/quote]
take a look at this thread:
http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=jogl;action=display;num=1092693292

To get the correct answer to this problem, register at dramaticjavagames.com for a six month subscription and send a mail to morten -at- dramaticjavagames -dot- com and I will answer it personally.