![]() |
|
|||||||
| Development Help Help for building applications or diagnosing problems with WWJ |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Jun 2008
Posts: 18
|
Some information for WWJ newbies, gathered here because I thought it would be nice to have everything here:
Introduction WorldWindJava is a Java API aimed at visualizing 3D globes. It uses language features only found in Java 5.0 and later, but you may want to use Java 6.0, as 5.0 is reaching its end-of-life period, and Java 7.0 is on the way. Launching examples via the command line Let's see how you can launch a WWJ example via the command line. All you need is a Java Runtime properly installed, and the WWJ SDK unzipped to the place of your choice. For this example we will use "HelloWorldWind" that you can find in the "gov.nasa.worldwind.examples" package. Configuring Eclipse I am using Eclipse 3.3.2 on Ubuntu using either OpenJDK or SUN's JDK.Configuring NetBeans To do... by someone who uses NetBeans ;-) Last edited by Hervé; 08-30-2008 at 05:24 PM. |
|
|
|
|
|
#2 |
|
Super Member
Join Date: Nov 2006
Location: 35.0376,-117.9688
Posts: 1,519
|
It's good you are posting this, it should be a big help for many.
I downloaded another copy of the source and tried this: Code:
neil@neil:~/WorldWind/WWJ-5$ java -Xmx512m -cp worldwind.jar:gluegen-rt.jar:jogl.jar gov.nasa.worldwind.examples.HelloWorldWind Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path Toshiba A105 Notebook, Intel dual core CPU, XP sps3 (WWJ runs fine there) Ubuntu 8.04, 2GB mem, 320GB hdd, Intel 945G video, Eclipse 3.2.2 Last edited by nlneilson; 08-30-2008 at 07:55 PM. |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jul 2007
Location: Mirabel, Quebec, Canada
Posts: 222
|
I agree this is a nice post for newbies... May I suggest you find/create a place in the WWJ wiki page as well?
http://www.worldwindcentral.com/wiki/Java Chiss! |
|
|
|
|
|
#4 |
|
Super Member
Join Date: Nov 2006
Location: 35.0376,-117.9688
Posts: 1,519
|
Got something working in Linux.
|
|
|
|
|
|
#6 |
|
God. Root. What is difference?
Join Date: Sep 2004
Location: Eastern Pennsylvania
Posts: 2,856
|
Been working on some WWJava applet tutorials myself:
http://earthissquare.com/2008/08/06/...to-a-web-page/ http://earthissquare.com/2008/08/10/...to-a-location/ http://earthissquare.com/2008/08/13/...bel-thy-earth/
__________________
![]() Earth is Square blog PUBLIC NOTICE AS REQUIRED BY LAW: Any use of this forum post, in any manner whatsoever, will increase the amount of disorder in the universe. Although no liability is implied herein, the consumer is warned that this process will ultimately lead to the heat death of the universe. |
|
|
|
|
|
#7 |
|
Guest
Posts: n/a
|
Hi,
The examples on launching WWJ in a web page is great, but, I am unable to successfully do that. I get unsatisfiedlinkerrors..Are there any steps missing? Do we need to sign all the jars? Could you please elaborate further as I am trying to setup a web application with WWJ applet on a html frame. Thanks, Suma. |
|
|
|
#8 |
|
Super Member
Join Date: Nov 2006
Location: 35.0376,-117.9688
Posts: 1,519
|
I have been using Eclipse. Post #1 did not have the configuration for NetBeans so I decided to try in order to help individuals (including myself).
I was able to pull the project from Eclipse and get it to run in NetBeans but this post will concern just the configuration in NetBeans 6.5. Trying to follow this to set it up there are things that need to be done or clarified. http://www.worldwindcentral.com/wiki...n_NetBeans_IDE 1. The characters that are not UTF-8 need to be deleted even though they are in the comments, that is straight forward, just click on the errors and it will take you to them. 2. From the above link "In the Swing/AWT Components Palette Manager". In NB 6.5 it is just AWT rather than Swing/AWT or Swing AWT. 3. "Create a helper class ..." That is: File->New File->Java Class Name the file "WWHelper" and it will add the .java extension. The file contents should look like it does in the link. 4. "Run->Clean and Build Main Project" gives this error: " ... WorldWindow.java file does not contain class WorldWindow" That file has Code:
public interface WorldWindow extends AVList http://forum.worldwindcentral.com/sh...ad.php?t=20768 Apparently somebody that knows NetBeans needs to get involved in a current tutorial. Last edited by nlneilson; 12-07-2008 at 07:32 PM. |
|
|
|
|
|
#9 |
|
Super Member
Join Date: Nov 2006
Location: 35.0376,-117.9688
Posts: 1,519
|
http://wiki.netbeans.org/HelloWorldWindJavaSDK
That was written using release 20070817 0 (WWJ 0.4.0 maybe) and NB 5.5 It will work with WWJ 0.5.0 and NB 6.5 for the worldwind.jar but as shown in that link there is no layer panel or status bar. Someone that has been using NB for WWJ should explain what they have done. Last edited by nlneilson; 12-08-2008 at 09:59 AM. |
|
|
|
|
|
#10 | |
|
Senior Member
Join Date: Jul 2007
Location: Mirabel, Quebec, Canada
Posts: 222
|
Quote:
This step by step guide was created with NetBeans 6.x and the 0.5.0 release of the SDK. However, the general principals outlined here should work regardless of the SDK version. Step 1: Unzip the SDK Step 2: Open NetBeans and create a New Project using the "Java Application" template. Fill in the required details but uncheck the 'Create Main class' box. Your new project should reside in a clean directory. Step 3: Rename WorldWind's 'build.xml' to something else (ww_build.xml) and copy all the WorldWind's unzipped content to your NetBeans project folder so that the src folders overlap. You should end up with a folder structure very similar to the WorldWind unzipped folder, plus a 'nbproject' and a 'test' folders. The 'build.xml' file is the one created by NetBeans, not the one that came with the zip (which is why we renamed it earlier). Step 4: From NetBeans, you will notice that some folders/classes are marked with a red exclamation mark. We now need to tell the project about the required libraries. Right-click your project's node and select 'Properties' (typically the last menu item). Select the 'Libraries' node from the Categories tree and press the 'Add JAR/folder' button on the right. Keeping CTRL down, select the 'gluegen-rt.jar' and 'jogl.jar' that are now inside your project folder. Click 'ok'. Step 5: At this point, only 2 classes in the '...examples.Applet' package don't compile (still have the red exclamation mark). Go back to the 'Libraries' category like before, but this time you need to add the 'plugin.jar' located in your JDK/jre/lib directory (for example, C:\Program Files\Java\jdk1.6.0_10\jre\lib\plugin.ja r) You can now run any of the examples by right-clicking them and selecting 'Run File' from the contextual menu. Hope this helps, Chiss! |
|
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| WWJ and Platform-dependence | smcnaughton | Development Help | 31 | 11-11-2009 02:09 PM |
| Help ! how do i load WWJ source code on Netbeans or Eclipse ? | Amvlf | Development Help | 3 | 11-13-2008 11:15 AM |
| WWJ vs WorldWind.net | coloradokid | WorldWind General | 10 | 10-09-2008 06:24 AM |
| SurfaceShapes are not translucent in WWJ 0.5 | vash | Development Help | 0 | 05-07-2008 02:05 PM |
| WWJ SDK Alpha 3 - 0.3.0 available | patmurris | WWJ Release Announcements | 35 | 12-03-2007 09:56 PM |