Saturday May 12, 2007
Hello NASA World Wind
Now that the worldwind.jar for NASA World Wind is available, here's the absolutely simplest scenario that you can implement very quickly and efficiently with NetBeans IDE:
- Download and unzip the World Wind Java SDK.
- In NetBeans IDE, select Tools / Palette Manager from the main menu. In the Swing/AWT Components Palette Manager, browse to the worldwind.jar. Select WorldWindowGLCanvas component and add it to the Beans category.
- Create a new Java application in NetBeans IDE. Open the Project Properties dialog box. In the Libraries tab, put the worldwind.jar on the compile time classpath. Put jogl.jar and gluegen-rt.jar, which are both in the World Wind Java SDK you downloaded, on the runtime classpath.
- Again within the Project Properties dialog box, use the Run tab to add a line such as the following in the VM Options text field:
-Djava.library.path=/path/to/unzipped/nasa/download
- Create a JFrame in your application. Drag and drop the WorldWindowGLCanvas from the palette onto the JFrame and, if you like, resize to cover the whole JFrame, with this result:

- Create a helper class, with this very basic content:
public class WWHelper { private WWHelper() { } public static void setup(final WorldWindow ww) { Model m = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME); ww.setModel(m); } }Then, back in the JFrame, add this line after the initComponents(), in the constructor:
WWHelper.setup(worldWindowGLCanvas1);
- Run the application. Let the JFrame's constructor be the application's starting point. Here's what you should see:

Use the mouse, or your keyboard's alternative, for panning and zooming:

This is the start of a series of blog entries on this topic. And a NetBeans tutorial will follow, as well as related NetBeans modules, such as templates and so on. With thanks to Ken Russell for help and support.
In other news. Check out the NetBeans On The Road 2007 hometown contest. If you win, you'll find those dusty NetBeans delivery guys on your doorstep, fresh from their recent Palestinian adventures, as recorded on http://netbeans.tv. Could be pretty cool if you enter together with a bunch of other people, such as from your college or JUG, because from what I hear those guys like to party.
May 12 2007, 03:45:11 AM PDT Permalink
Posted by peter on May 12, 2007 at 05:25 AM PDT #
peter, sorry to hear that. I'm using NVidia on Ubuntu 7.04 without any problems (knock on wood).
Posted by Geertjan on May 12, 2007 at 11:47 AM PDT #
http://blogs.sun.com/geertjan/entry/hello_nasa_world_wind
NASA World Wind的worldwind.jar已经正式发布, 下面我们来看一些最简单的 例子,这些例子都可以在NetBeans中快速和敏捷地实现。
Posted by Classicning Clog on May 12, 2007 at 11:24 PM PDT #
Posted by Orlando Warren on May 13, 2007 at 10:37 PM PDT #
Posted by Geertjan on May 14, 2007 at 06:03 AM PDT #
Posted by Geertjan on May 14, 2007 at 06:34 AM PDT #
Posted by Orlando Warren on May 14, 2007 at 03:19 PM PDT #
Posted by Geertjan on May 14, 2007 at 04:49 PM PDT #
Posted by Geertjan on May 14, 2007 at 05:02 PM PDT #
Posted by 72.47.27.140 on May 15, 2007 at 08:05 AM PDT #
Posted by vincecrue on May 17, 2007 at 09:59 AM PDT #
Posted by Mario on May 19, 2007 at 11:21 AM PDT #
i also have the same problem as Mario.. bith worldwind 1.4 and the basic demo that comes with WW java jdk works fine but when i follow all the steps mentioned above all i get is a black screen with dots and only dots.. can you please suggest what the problem might be?
Posted by luigi on October 30, 2007 at 09:54 AM PDT #
I think it is best to write to nbusers@netbeans.org with this question.
Posted by Geertjan on October 30, 2007 at 09:58 AM PDT #
Are you using Netbeans 5.5.1 in this turorial? I am having problems too with this, I emailed netbeans.org about the problem and they have no idea.
When you say create a helper class, do you mean create a new "java class" with the name of "WWHelper"? Because I cannot find anything that refers to a helper class.
Posted by Kevin on January 01, 2008 at 10:15 AM PST #
Yes, just a normal Java class.
Posted by Geertjan on January 01, 2008 at 10:23 AM PST #
Here is the error im getting:
init:
deps-jar:
Created dir: /home/kevin/WWJTEST/build/classes
Compiling 3 source files to /home/kevin/WWJTEST/build/classes
/home/kevin/WWJTEST/src/wwjtest/WWHelper.java:21: cannot find symbol
symbol : class WorldWindow
location: class wwjtest.WWHelper
public static void setup(final WorldWindow ww) {
/home/kevin/WWJTEST/src/wwjtest/NewJFrame.java:18: cannot find symbol
symbol : variable worldWindowGLCanvas1
location: class wwjtest.NewJFrame
WWHelper.setup(worldWindowGLCanvas1);
/home/kevin/WWJTEST/src/wwjtest/WWHelper.java:22: cannot find symbol
symbol : class Model
location: class wwjtest.WWHelper
Model m = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME);
/home/kevin/WWJTEST/src/wwjtest/WWHelper.java:22: cannot find symbol
symbol : class Model
location: class wwjtest.WWHelper
Model m = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME);
/home/kevin/WWJTEST/src/wwjtest/WWHelper.java:22: cannot find symbol
symbol : variable AVKey
location: class wwjtest.WWHelper
Model m = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME);
/home/kevin/WWJTEST/src/wwjtest/WWHelper.java:22: cannot find symbol
symbol : variable WorldWind
location: class wwjtest.WWHelper
Model m = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME);
6 errors
BUILD FAILED (total time: 1 second)
Posted by Kevin on January 01, 2008 at 10:27 AM PST #
Here is the error im getting:
init:
deps-jar:
Created dir: /home/kevin/WWJTEST/build/classes
Compiling 3 source files to /home/kevin/WWJTEST/build/classes
/home/kevin/WWJTEST/src/wwjtest/WWHelper.java:21: cannot find symbol
symbol : class WorldWindow
location: class wwjtest.WWHelper
public static void setup(final WorldWindow ww) {
/home/kevin/WWJTEST/src/wwjtest/NewJFrame.java:18: cannot find symbol
symbol : variable worldWindowGLCanvas1
location: class wwjtest.NewJFrame
WWHelper.setup(worldWindowGLCanvas1);
/home/kevin/WWJTEST/src/wwjtest/WWHelper.java:22: cannot find symbol
symbol : class Model
location: class wwjtest.WWHelper
Model m = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME);
/home/kevin/WWJTEST/src/wwjtest/WWHelper.java:22: cannot find symbol
symbol : class Model
location: class wwjtest.WWHelper
Model m = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME);
/home/kevin/WWJTEST/src/wwjtest/WWHelper.java:22: cannot find symbol
symbol : variable AVKey
location: class wwjtest.WWHelper
Model m = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME);
/home/kevin/WWJTEST/src/wwjtest/WWHelper.java:22: cannot find symbol
symbol : variable WorldWind
location: class wwjtest.WWHelper
Model m = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME);
6 errors
BUILD FAILED (total time: 1 second)
Posted by Kevin on January 01, 2008 at 11:36 AM PST #
sorry about the double post, it said comment authentication failed.
Posted by kevin on January 01, 2008 at 11:37 AM PST #
i created two files by the name of
WWTopComponent.java - containing code for JForm, and
WWHelper.java - containing code for Helper class
this was the error i got after running the project:
init:
deps-jar:
compile:
run:
java.lang.NoClassDefFoundError: wind
Exception in thread "main"
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)
on further checking, i found the following errors in the private initComponents() - generated by the Form Editor
cannot find symbol
symbol: method add(gov.nasa.worldwind.awt.WorldWindowGLCanvas,int,int,short)
location: class org.jdesktop.layout.GroupLayout.SequentialGroup
cannot find symbol
symbol: method addContainerGap()
location: class org.jdesktop.layout.GroupLayout.SequentialGroup.add
PLEASE HELP!!!!!
Posted by utkarsh on May 14, 2008 at 09:41 PM PDT #


