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 09-02-2009, 09:48 PM   #1
sam03
Junior Member
 
Join Date: Sep 2009
Posts: 2
sam03 is on a distinguished road
Default [Solved] Hello NASA World Wind -NetBeans6.7.1

I followed the tutorial from
http://blogs.sun.com/geertjan/entry/...asa_world_wind

but
JFrame initComponemts()
The .addComponent(..)
are giving errors of "cannot find symbol"


how do I fix this NetBeans6.7.1 issue that is related to Worldwind?


Thanks in advance..




---------this is the generated code-----------------------------
gov.nasa.worldwind.awt.WorldWindowGLCanv as worldWindowGLCanvas1 = new gov.nasa.worldwind.awt.WorldWindowGLCanv as();


----The error occurs here-----------------------
.addComponent(worldWindowGLCanvas1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

Last edited by patmurris; 09-06-2009 at 06:06 PM. Reason: Solved
sam03 is offline   Reply With Quote
Old 09-04-2009, 04:51 AM   #2
RAM357
Member
 
Join Date: Aug 2009
Location: Georgetown, TX
Posts: 72
RAM357 is on a distinguished road
Default

Hi sam03,

I'm brand new to Java and to WorldWind, but I've been pursuing development using NetBeans for a few weeks now.

The instructions here from Chiss cover most everything required to get WWJ to the point you can run the examples from within the project in NetBeans (I have set this up successfully in both NB 6.5.1 and 6.7.1)...

(Note: There is a problem in the WWJ project in NB 6.7 that does not present itself as an issue in NB 6.5. After following all the steps here there will still be a conflict that keeps the project from compiling. Some sort of 'have the same erasure, yet neither overrides the other' error in a class called 'geom' I think (I'm at home away from the code right now) related to the function 'positionsCrossDateLine'. I have not figured out how to fix this yet. But it doesn't prevent you from run example files from the project.)

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!
One additional step that was needed in my case was...
- right click the project and click 'properties' again
- click 'Run' in the tree on the left side
- add the following in the VM Options field

-Djava.library.path=path/to/folder/containing/jogl/jars

(I have my jogl jars in a folder outside the project. You may not have to do this last step if the jogl jar files are in the project... I'm not sure.)

Good luck with it!
RAM357 is offline   Reply With Quote
Old 09-04-2009, 05:14 PM   #3
sam03
Junior Member
 
Join Date: Sep 2009
Posts: 2
sam03 is on a distinguished road
Default

Thanks a lot..It worked fine
sam03 is offline   Reply With Quote
Old 06-21-2010, 04:37 PM   #4
Sanjay
Guest
 
Posts: n/a
Smile It works fine

Its works fine..

Thanks..

I am able to see the examples now...
  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
NASA Uses Isilon IQ to Advance Visual Imaging of Earth bull Community Chat 0 03-21-2007 06:29 AM
World Wind RC2 bull Announcements & News 15 12-29-2006 01:14 AM
NASA World Wind 1.3.3.1 Released bull Announcements & News 0 10-31-2005 06:52 PM
World Wind 1.3.3 released Randy Kim Announcements & News 0 10-22-2005 05:37 AM
World Wind 1.3.2 released Beansprout Announcements & News 0 09-07-2005 11:51 PM


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


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