When jogl-all-android.jar is in the classpath, JOGL tries to look for jogl-all-android-natives-macosx-universal.jar under OSX for example. This bug can be reproduced under GNU Linux too. The problem is that the error isn't very explicit: Catched FileNotFoundException: /Library/Java/Extensions/gluegen-rt-android-natives-macosx-universal.jar (No such file or directory), while TempJarCache.bootstrapNativeLib() of jar:file:/Library/Java/Extensions/gluegen-rt-android-natives-macosx-universal.jar!/ (file:/Library/Java/Extensions/ + gluegen-rt-android-natives-macosx-universal.jar) Catched FileNotFoundException: /Library/Java/Extensions/jogl-all-android-natives-macosx-universal.jar (No such file or directory), while addNativeJarLibsImpl(classFromJavaJar class jogamp.nativewindow.NWJNILibLoader, classJarURI jar:file:/Library/Java/Extensions/jogl-all-android.jar!/jogamp/nativewindow/NWJNILibLoader.class, nativeJarBaseName jogl-all-android): jogl-all-android-natives-macosx-universal.jar + file:/Library/Java/Extensions/ -> jar:file:/Library/Java/Extensions/jogl-all-android-natives-macosx-universal.jar!/ Catched IOException: TempJarCache: addNativeLibs: jar:file:/Library/Java/Extensions/jogl-all-android-natives-macosx-universal.jar!/, previous load attempt failed, while addNativeJarLibsImpl(classFromJavaJar class jogamp.nativewindow.NWJNILibLoader, classJarURI jar:file:/Library/Java/Extensions/jogl-all-android.jar!/jogamp/nativewindow/NWJNILibLoader.class, nativeJarBaseName jogl-all-android): jogl-all-android-natives-macosx-universal.jar + file:/Library/Java/Extensions/ -> jar:file:/Library/Java/Extensions/jogl-all-android-natives-macosx-universal.jar!/ Catched IOException: TempJarCache: addNativeLibs: jar:file:/Library/Java/Extensions/jogl-all-android-natives-macosx-universal.jar!/, previous load attempt failed, while addNativeJarLibsImpl(classFromJavaJar class jogamp.nativewindow.NWJNILibLoader, classJarURI jar:file:/Library/Java/Extensions/jogl-all-android.jar!/jogamp/nativewindow/NWJNILibLoader.class, nativeJarBaseName jogl-all-android): jogl-all-android-natives-macosx-universal.jar + file:/Library/Java/Extensions/ -> jar:file:/Library/Java/Extensions/jogl-all-android-natives-macosx-universal.jar!/ Exception in thread "main" javax.media.opengl.GLException: No default device available at javax.media.opengl.GLProfile.getProfileMap(GLProfile.java:2011) at javax.media.opengl.GLProfile.get(GLProfile.java:863) at javax.media.opengl.GLProfile.getDefault(GLProfile.java:597) at javax.media.opengl.awt.GLCanvas.<init>(GLCanvas.java:247) at javax.media.opengl.awt.GLCanvas.<init>(GLCanvas.java:197) at javax.media.opengl.awt.GLCanvas.<init>(GLCanvas.java:187) at joglquad.JOGLQuad.main(JOGLQuad.java:78) GlueGen seems to look for only the Android native libraries when jogl-all-android.jar and jogl-all.jar are both in the classpath. Several people already made the same mistake. Shouldn't GlueGen skip Android native libraries at runtime when the operating system is another one?
Shouldn't we add "-android" here? https://github.com/sgothel/jogl/blob/master/src/nativewindow/classes/jogamp/nativewindow/NWJNILibLoader.java#L49
I have to modify these lines too: https://github.com/sgothel/jogl/blob/master/src/newt/classes/jogamp/newt/NEWTJNILibLoader.java#L62 https://github.com/sgothel/jogl/blob/master/src/jogl/classes/javax/media/opengl/GLProfile.java#L155 It would be nice if someone could test with Android: http://forum.jogamp.org/Recreating-Jogl2-Android-demo-projects-in-Eclipse-td4027079.html
First attempt of fix: https://github.com/gouessej/jogl/commit/617aa7ad3e39e1adaac6d099b4d23fee52cfed0c
Thank you Julien! I took the freedom and moved the new method to GlueGen's JNILibLoaderBase class to solve JOGL's module dependency. Better API doc added as well, my old one was .. errr .. not so clear. Referencing you in commit log.