0

i installed Jogl and included it in the build path of eclipse but it is under referenced libraries. Here is the program.

public class exceptionhandler
{ // open HelloWorld

    public static void main(String[] args)
    { // open main
        try
        { // open try
            System.loadLibrary("jogl");
            System.out.println("Hello World! (The native libraries are installed.)");
        } // close try
        catch (Exception e) // all try's need a catch
        { } // even if the catch does nothing
    } // close main

} // close HelloWorld

I did not include the import because Eclipse didn't recognize it. So when i do run it i get this>

Exception in thread "main" java.lang.UnsatisfiedLinkError: no jogl in java.library.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at exceptionhandler.main(exceptionhandler.java:8)
Udo Held
  • 12,314
  • 11
  • 67
  • 93
Izzy Nakash
  • 177
  • 2
  • 2
  • 12

2 Answers2

0

Are you sure you use the latest version of JOGL? Have you downloaded the JARs containing the native libraries too? Have you put them into the same directory than jogl-all.jar and gluegen-rt.jar?

gouessej
  • 3,640
  • 3
  • 33
  • 67
-1

Have you specified the path to jogl.dll in the Eclipse build-path settings?

See https://stackoverflow.com/a/958074/1216956 for instructions.

Community
  • 1
  • 1
FauxFaux
  • 2,445
  • 16
  • 20
  • Setting the Java library path or the "native libraries" in Eclipse is no longer mandatory since the second version of JOGL. The JARs containing the native libraries must be in the same directory than those containing the classes (jogl-all.jar and gluegen-rt.jar). Please rather follow these instructions: http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE#Eclipse_IDE_project – gouessej Feb 04 '14 at 19:58