View previous topic :: View next topic |
Author |
Message |
tobiasbeil Guru
Joined: 22 Nov 2004 Posts: 326 Location: Stuttgart
|
Posted: Wed Dec 14, 2005 2:54 pm Post subject: Eclipse + Java OpenGL Anbindung "jogl". |
|
|
Hallo alle.
Eigentlich sollte die "installation" von jogl (https://jogl.dev.java.net/) kein Problem sein,
zumindest gilt das für Windows. Man muss nur die Dateien "jogl.jar" und "jogl-natives-<system>.jar"
herunterladen und ins "<javahome>/lib" Verzeichnis kopieren. Unter WindowsXP funktioniert
das in Zusammenspiel mit Eclipse auch 100%ig einwandfrei. Man muss nur im Projekt die
externe Jar Datei "jogl.jar" angeben, das wars (Unirechner=WinXP).
Die selben Schritte daheim unter meinem Gentoo angewandt führen dazu, dass es trotzdem nicht geht.
Aus irgendeinem Grund tut er so als wenn er die jogl.jar nicht finden könnte.
Mein Java Home: "/opt/sun-jdk-<ver>/"
jogl.jar, jogl-natives-linux.jar in: "/opt/sun-jdk-<ver>/lib"
Mein Classpath: ".:/opt/sun-jdk-<ver>/jogl.jar"
Fehlermeldung Eclipse:
Code: | Exception in thread "main" java.lang.UnsatisfiedLinkError: no jogl in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1517)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at net.java.games.jogl.impl.NativeLibLoader$1.run(NativeLibLoader.java:72)
at java.security.AccessController.doPrivileged(Native Method)
at net.java.games.jogl.impl.NativeLibLoader.load(NativeLibLoader.java:58)
at net.java.games.jogl.impl.x11.X11GLContextFactory.<clinit>(X11GLContextFactory.java:50)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at net.java.games.jogl.impl.GLContextFactory.getFactory(GLContextFactory.java:69)
at net.java.games.jogl.GLDrawableFactory.createGLCanvas(GLDrawableFactory.java:150)
at net.java.games.jogl.GLDrawableFactory.createGLCanvas(GLDrawableFactory.java:118)
at net.java.games.jogl.GLDrawableFactory.createGLCanvas(GLDrawableFactory.java:85)
at OpenGL_Test.<init>(OpenGL_Test.java:18)
at OpenGL_Test.main(OpenGL_Test.java:46) |
Hat sonst jemand mit jogl unter Linux geschafft? |
|
Back to top |
|
|
zworK Guru
Joined: 07 May 2004 Posts: 308
|
Posted: Wed Dec 14, 2005 7:49 pm Post subject: |
|
|
Anstatt diese nach <javahome>/lib zu kopieren, pack sie direkt in dein Projektverzeichnis. Ein Refresh im Paket Explorer unter Eclipse sollte die benötigten jogl jars promt anzeigen.
Dann unter den Projekt Properties -> Java Build Path -> Libraries mit add jars (nicht external!) die jars aus deinem Projektverzeichnis auswählen. So bleibt dein Programm auch system- und plattformübergreifend portabel. |
|
Back to top |
|
|
mtj Tux's lil' helper
Joined: 01 Feb 2004 Posts: 138 Location: Germany
|
Posted: Thu Dec 15, 2005 5:07 am Post subject: |
|
|
Habe das zwar nicht in Kombination mit eclipse probiert, aber soweit ich mich erinnere, muß man die jogl-natives-<system>.jar entpacken. Bei mir liegen zumindest in jre/lib/i386 die Dateien libjogl.so, libjogl_awt.so und libjogl_cg.so.
Dein Unsatisfied Link error läßt außerdem auf eine fehlende Bibliothek schließen, also versuche es mal... |
|
Back to top |
|
|
|