World Wind Forums

Go Back   World Wind Forums > WorldWind JAVA forums > Development Help

Development Help Help for building applications or diagnosing problems with WWJ

Reply
 
Thread Tools Display Modes
Old 12-03-2009, 09:29 PM   #1
Logan Williams
Junior Member
 
Join Date: Oct 2009
Posts: 7
Logan Williams is on a distinguished road
Default no gluegen-rt in java.library.path

Hello,

I am trying to compile a JAR file in Eclipse and run it on a different system. I can compile the JAR file, and Eclipse says that it is packaging all required libraries into that file. When I try running it on the second system however, I get this response:

Code:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1709)
	at java.lang.Runtime.loadLibrary0(Runtime.java:823)
	at java.lang.System.loadLibrary(System.java:1028)
	at com.sun.gluegen.runtime.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:102)
	at com.sun.gluegen.runtime.NativeLibLoader.access$000(NativeLibLoader.java:51)
	at com.sun.gluegen.runtime.NativeLibLoader$1.run(NativeLibLoader.java:70)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.gluegen.runtime.NativeLibLoader.loadGlueGenRT(NativeLibLoader.java:68)
	at com.sun.gluegen.runtime.NativeLibrary.ensureNativeLibLoaded(NativeLibrary.java:399)
	at com.sun.gluegen.runtime.NativeLibrary.open(NativeLibrary.java:163)
	at com.sun.gluegen.runtime.NativeLibrary.open(NativeLibrary.java:129)
	at com.sun.opengl.impl.x11.DRIHack.begin(DRIHack.java:109)
	at com.sun.opengl.impl.x11.X11GLDrawableFactory.<clinit>(X11GLDrawableFactory.java:99)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:169)
	at javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java:111)
	at javax.media.opengl.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:520)
	at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:131)
	at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:90)
	at gov.nasa.worldwind.awt.WorldWindowGLCanvas.<init>(Unknown Source)
	at gov.nasa.worldwind.examples.ApplicationTemplate$AppPanel.createWorldWindow(Unknown Source)
	at gov.nasa.worldwind.examples.ApplicationTemplate$AppPanel.<init>(Unknown Source)
	at gov.nasa.worldwind.examples.ApplicationTemplate$AppFrame.createAppPanel(Unknown Source)
	at gov.nasa.worldwind.examples.ApplicationTemplate$AppFrame.initialize(Unknown Source)
	at gov.nasa.worldwind.examples.ApplicationTemplate$AppFrame.<init>(Unknown Source)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at java.lang.Class.newInstance0(Class.java:355)
	at java.lang.Class.newInstance(Class.java:308)
	at gov.nasa.worldwind.examples.ApplicationTemplate.start(Unknown Source)
	at gov.nasa.worldwind.examples.ApplicationTemplate.main(Unknown Source)
oblong@obclone:~/WorldWind/worldwind$ java -jar worldwind.jar
Exception in thread "main" java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1709)
	at java.lang.Runtime.loadLibrary0(Runtime.java:823)
	at java.lang.System.loadLibrary(System.java:1028)
	at com.sun.gluegen.runtime.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:102)
	at com.sun.gluegen.runtime.NativeLibLoader.access$000(NativeLibLoader.java:51)
	at com.sun.gluegen.runtime.NativeLibLoader$1.run(NativeLibLoader.java:70)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.gluegen.runtime.NativeLibLoader.loadGlueGenRT(NativeLibLoader.java:68)
	at com.sun.gluegen.runtime.NativeLibrary.ensureNativeLibLoaded(NativeLibrary.java:420)
	at com.sun.gluegen.runtime.NativeLibrary.open(NativeLibrary.java:179)
	at com.sun.gluegen.runtime.NativeLibrary.open(NativeLibrary.java:129)
	at com.sun.opengl.impl.x11.DRIHack.begin(DRIHack.java:109)
	at com.sun.opengl.impl.x11.X11GLDrawableFactory.<clinit>(X11GLDrawableFactory.java:99)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:169)
	at javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java:111)
	at javax.media.opengl.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:520)
	at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:131)
	at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:90)
	at gov.nasa.worldwind.awt.WorldWindowGLCanvas.<init>(Unknown Source)
	at gov.nasa.worldwind.examples.ApplicationTemplate$AppPanel.createWorldWindow(Unknown Source)
	at gov.nasa.worldwind.examples.ApplicationTemplate$AppPanel.<init>(Unknown Source)
	at gov.nasa.worldwind.examples.ApplicationTemplate$AppFrame.createAppPanel(Unknown Source)
	at gov.nasa.worldwind.examples.ApplicationTemplate$AppFrame.initialize(Unknown Source)
	at gov.nasa.worldwind.examples.ApplicationTemplate$AppFrame.<init>(Unknown Source)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at java.lang.Class.newInstance0(Class.java:355)
	at java.lang.Class.newInstance(Class.java:308)
	at gov.nasa.worldwind.examples.ApplicationTemplate.start(Unknown Source)
	at gov.nasa.worldwind.examples.ApplicationTemplate.main(Unknown Source)
I'm compiling the JAR on Mac OS X, and moving it to a 64-bit linux system. I thought that it might be fixable by using a 64 bit version of gluegen-rt, so I duplicated the Eclipse project, and replaced the original gluegen-rt with the amd64 version I downloaded from jogl's website. The recompiled JAR however, returned the same error.

Does anyone have any idea what could be the problem here, or what other avenues I can explore to fix it? Any help would be sincerely appreciated.

Thanks,
Logan Williams
Logan Williams is offline   Reply With Quote
Old 12-03-2009, 09:51 PM   #2
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,621
nlneilson is on a distinguished road
Default

Do a search for "no gluegen" or "no jogl". This has been covered in several threads.

Under Win OS jogl.dll and jogl_awt.dll needs to be in the same directory as your WWJ app.jar.
This was using Eclipse and fatjar.

On Linux Ubuntu I just installed the jogl package.

Some have been able to set the path in the manifest, on the command line or whatever.
I didn't have much luck this way but didn't take the time to learn what is necessary.
nlneilson is online now   Reply With Quote
Old 12-03-2009, 10:01 PM   #3
Logan Williams
Junior Member
 
Join Date: Oct 2009
Posts: 7
Logan Williams is on a distinguished road
Default

But I already have gluegen-rt.jar and jogl.jar in the same directory as the jar file I'm trying to execute...
Logan Williams is offline   Reply With Quote
Old 12-03-2009, 10:06 PM   #4
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,621
nlneilson is on a distinguished road
Default

You need the .dll files.

edit: Try copying all the jogl related files to the directory your .jar is in then deleting a few at a time to see what is required. If I remember correctly the worldwind.jar needs a few more than just the two .dll files mentioned.

Last edited by nlneilson; 12-03-2009 at 10:15 PM.
nlneilson is online now   Reply With Quote
Old 12-03-2009, 10:11 PM   #5
Logan Williams
Junior Member
 
Join Date: Oct 2009
Posts: 7
Logan Williams is on a distinguished road
Default

.dll files on Linux?
Logan Williams is offline   Reply With Quote
Old 12-03-2009, 10:19 PM   #6
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,621
nlneilson is on a distinguished road
Default

No

Linux uses the .so and maybe others. I just installed the jogl package there.

Trying on different computers there was a problem mixing in the 64bit. Try just using the 32bit on Linux.

edit: There is also a problem using the 64bit java, whether Sun's or openJava. You can do a search on the internet to find this. Stick with the 32bit java and jogl on Linux.

Last edited by nlneilson; 12-03-2009 at 10:28 PM.
nlneilson is online now   Reply With Quote
Old 12-05-2009, 01:42 AM   #7
borsightjohn
John
 
Join Date: Nov 2009
Posts: 46
borsightjohn is on a distinguished road
Default

I have found that the easiest solution to this problem is to install the jogl package from synaptic (Ubuntu) or yum (Fedora). I know this should works as is, but there seems to be a problem with java finding the jogl native libs when you run the jnlp in java.
borsightjohn is offline   Reply With Quote
Old 12-05-2009, 11:59 PM   #8
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,621
nlneilson is on a distinguished road
Default

Here is a link to another thread where others have added posts
http://forum.worldwindcentral.com/sh...ghlight=ubuntu

As mentioned in post #2 doing a search for a problem is usually the easiest and fastest way to find a solution or solutions to a problem.

Note: I have found WWJ is slightly faster in Linux in some situations than it is in Windows.

Last edited by nlneilson; 12-06-2009 at 05:23 PM. Reason: clarify
nlneilson is online now   Reply With Quote
Old 04-14-2010, 05:38 PM   #9
Unregistered
Guest
 
Posts: n/a
Thumbs up

I've found the solution for this problem, when the project is compiled in Eclipse.
Just do this:
-> Right Click the Project folder
-> Run As
-> Run configurations...
-> "Arguments" tab
-> VM Arguments:
-> Insert: "-Djava.library.path=$path:."

I've been having this problem and to compile I would simply
use the shell, only until the debug mode was really necessary.

This is working fine for me.
Hope it might help someone!
  Reply With Quote
Old 02-10-2012, 07:02 PM   #10
Unregistered
Guest
 
Posts: n/a
Default

I've also had that message and found which option I was lacking:

After I added (jogl.jar and) gluegen-rt.jar at project>properties>JavaBuildPath>Librari es
I still had to set one more option on gluegen-rt.jar: In the same menu expand the gluegen-rt.jar, which I had added. There the entry "Native Library Location" had to be set.

then the eclipse-play button worked
  Reply With Quote
Reply

Tags
gluegen, gluegen-rt, jar, jogl, libraries


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
no jogl in java.library.path Kashank Development Help 20 09-07-2011 07:32 AM
no gluegen-rt in java.library.path nlneilson Development Help 13 11-18-2010 11:32 AM
World Wind Java 0.2.0: which JOGL and gluegen versions? fabrizio.giudici Development Help 2 06-07-2007 05:47 PM


All times are GMT +1. The time now is 01:21 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.