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 06-26-2009, 04:02 PM   #1
Kashank
Senior Member
 
Join Date: Jun 2009
Posts: 128
Kashank is on a distinguished road
Exclamation no jogl in java.library.path

ok so I've got my file going.

it compiles perfectly, builds perfectly, and runs perfectly. All within Netbeans.

Everything works within netbeans.

(I have -djava path in vm options, I have the libraries in the compile and jogl in the run properties)

Once you build it gives the message

To run this application from the command line without Ant, Try:
Java -jar "c:\path\to\my\jar.jar"


When I run this from command I get

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: No jogl in java.library.path

Why does my program work within netbeans but won't run the .jar with the command prompt?
Kashank is offline   Reply With Quote
Old 06-26-2009, 09:38 PM   #2
zaknixon
Member
 
Join Date: Mar 2008
Posts: 91
zaknixon is on a distinguished road
Default

Follow the JOGL installation instructions.

Place the .dll files in your JAVA_HOME/jre/bin directory.
Place the jars in your JAVA_HOME/jre/lib/ext directory.

Everything 'should' work then.
zaknixon is offline   Reply With Quote
Old 06-26-2009, 11:43 PM   #3
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,616
nlneilson is on a distinguished road
Default

It seems that the jogl developers should have made an installer/updater.
nlneilson is offline   Reply With Quote
Old 06-27-2009, 12:39 AM   #4
patmurris
WWJ Consultant
 
patmurris's Avatar
 
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
patmurris is an unknown quantity at this point
Default

Look at the build.xml, it contains a script for JOGL setup.
However, this part is commented out right now i think, because of the transition to JOGL 2 for which we are not ready yet.
__________________
My World Wind Java Blog & WW.net Plugins page
patmurris is offline   Reply With Quote
Old 11-08-2010, 08:01 PM   #5
geodan
World Wind Developer
 
geodan's Avatar
 
Join Date: Aug 2005
Location: United States
Posts: 358
geodan
Default Same issue, Java hurts...

Hey Guys,

I'm having the same issue, and I'm sure it's something relatively easy. I'm just trying to get involved with WorldWind Java...but coming from .NET, it hurts. Was anyone able to resolve the 'no jogl found in library path' error?

Any tips are greatly appreciated. I just want to be able to compile files and run them...

thanks,
Dan

Last edited by geodan; 11-08-2010 at 08:10 PM.
geodan is offline   Reply With Quote
Old 11-08-2010, 08:19 PM   #6
Kashank
Senior Member
 
Join Date: Jun 2009
Posts: 128
Kashank is on a distinguished road
Default

it's been a while since I messed with this... however I no longer attempt to run it from the command prompt.

I create a JNLP file which basically tells the java application where it's resources live, and then I have a folder with all the jogl resources included (.dlls and jars).
Kashank is offline   Reply With Quote
Old 11-08-2010, 10:00 PM   #7
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,616
nlneilson is on a distinguished road
Default

If you have the .dlls (only two required) in the directory as your app in Win it should work.

In Linux, which does not automatically search the current dir:
-Djava.library.path=.
In Linux all the jogl files in the WWJ SDK are in the dir with the app, have not taken the time to see what can be omitted (.dll + ?).

I often run/suggest a .bat file for the app/s in Win.
I always use a .bash file in Linux (except tinkering on the command line)
-Xmx512m -Dsun.java2d.noddraw=true

You can run out of heap space with Java.

edit: Note that in Linux if you make a link to your app and move/drag the link to the desktop your .bash starts in that dir. A line in the .bash should cd to the dir where your app is.

cd /home/neil/WW
java -Xmx512m -Dsun.java2d.noddraw=true -Djava.library.path=. -jar NLNww.jar
read -p "end"

Last edited by nlneilson; 11-08-2010 at 10:46 PM.
nlneilson is offline   Reply With Quote
Old 11-08-2010, 10:04 PM   #8
geodan
World Wind Developer
 
geodan's Avatar
 
Join Date: Aug 2005
Location: United States
Posts: 358
geodan
Default not yet

well, i've tried just about every combination of putting files in different places...not yet working. I've taken a look at the JNLP files that NASA has on their demos page...tried to modify one of those and it seems like it might almost work...but...i get signing errors. As for JOGL, I assume that it's ok to reference it by URL like NASA does in their JNLP files.

These are the reasons I've avoided JAVA for so long, just a pain to get apps working and distributed.

any other dev tips that you might have are greatly appreciated.

thanks,
Dan
geodan is offline   Reply With Quote
Old 11-08-2010, 11:10 PM   #9
pabercrombie
WW Dev. Team
 
Join Date: Sep 2010
Location: Boston, MA, USA
Posts: 325
pabercrombie is on a distinguished road
Default

geodan: Can you explain how you're trying to run WorldWind? Is it from the command line? On what operating system?

On Windows, a minimal WorldWind setup is:

Code:
C:\test>dir

 Directory of C:\test

11/08/2010  03:02 PM    <DIR>          .
11/08/2010  03:02 PM    <DIR>          ..
11/08/2010  10:18 AM            20,480 gluegen-rt.dll
11/08/2010  10:18 AM            18,416 gluegen-rt.jar
11/08/2010  10:18 AM           315,392 jogl.dll
11/08/2010  10:18 AM         1,126,403 jogl.jar
11/08/2010  10:18 AM            20,480 jogl_awt.dll
11/08/2010  10:18 AM           114,688 jogl_cg.dll
11/08/2010  10:18 AM         6,279,828 worldwind.jar
I can run the basic WorldWind demo by executing:

Code:
C:\test>java -jar worldwind.jar
On Windows, Java looks in the current working directory for the native libraries. As nlneilson pointed out, this may not be the case on other systems. You can specify the native library directory with the -Djava.library.path flag, as in:

Code:
C:\test>java -Djava.library.path=. -jar worldwind.jar
pabercrombie is offline   Reply With Quote
Old 11-08-2010, 11:32 PM   #10
geodan
World Wind Developer
 
geodan's Avatar
 
Join Date: Aug 2005
Location: United States
Posts: 358
geodan
Default what i'm trying to do

What I'm trying to do is take one of the examples, i.e. the Measure Tool Usage example...and separate it into its own project...that I can start testing/modifying and so forth.

Ideally, I'd be able to distribute something like the Measure Tool Usage example, on both Windows AND Mac.

I followed the instructions on the wiki, and I can "right-click" on the examples and they run within NetBeans...but...if I try to set the Main Class as the Measure Tool Usage example, it will run within netbeans, but I can't get the JAR file to execute via command line...nor if I create a JNLP file, I get a variety of errors, mostly to do with "signing".

These concepts are fairly new to me because I'm a .NET guy.



(tomorrow is another day I guess)
geodan is offline   Reply With Quote
Reply


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
What version of JOGL is this with WWJ 1.6?? naql Development Help 2 06-22-2009 04:22 PM
no jogl in path cmaxwell Development Help 6 07-15-2008 02:07 AM
WWJ SDK to abstract JOGL to make a map server mikequentel Applications 0 05-01-2008 07:32 PM
JOGL forum/Behavior of WWJ Applet in Browser rogene Development Help 1 04-21-2008 02:39 AM
JOGL programming adrianboimvaser Development Help 7 03-28-2008 08:56 PM


All times are GMT +1. The time now is 03:29 PM.


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