WWJava in NetBeans IDE

From World Wind Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 08:36, 11 January 2018 (edit)
Monday (Talk | contribs)

← Previous diff
Current revision (21:14, 21 August 2019) (edit) (undo)
F0urtyfive (Talk | contribs)
m (Reverted edits by Monday (Talk); changed back to last version by Dksmiffs)
 
Line 1: Line 1:
-hll20180112+__TOC__
-http://www.outletmichaelkorsonline.us.com+==(0.6 SDK era) Tracking WWJava SDK versions from NetBeans==
-http://www.coach-outletonlines.us.com+Chiss' instructions (0.5 SDK era, see below) for initial NetBeans build remain an excellent help for building a 0.6 WWJava SDK using NetBeans 6.9.1 and 32-bit version of the JDK 1.6.0_22 on a Windows 7 64-bit machine. If you're building the WWJava SDK for the first time, follow those instructions and add 'gdal.jar' at the same time you're adding 'gluegen-rt.jar' and 'jogl.jar' via the 'Add JAR/Folder' button.
-http://www.mulberry-bags.me.uk+ 
-http://www.ralphlaurensale-clearance.me.uk+The WWJava team doesn't publish a CM repository as of December 2010. It uses Subversion (SVN) internally. There's plenty of discussion on this subject in the forums if you're interested. If you'd like to effectively track WWJava builds releases externally using Mercurial, keep reading this section. These instructions assume you're familiar with Mercurial, its integration with NetBeans, and that you've already committed an initial version of the WWJava SDK to a Mercurial repository inside NetBeans:
-http://www.adidasnmdr1.us.com+* Download the desired SDK version from the [http://builds.worldwind.arc.nasa.gov/releases WWJava releases] site.
-http://www.ultraboost.us+* Extract the zip file to a local directory, not in your Mercurial source tree yet.
-http://wwwcanadagoose-uk.com.co+* Rename top level 'build.xml' to 'build_ww.xml' (see the 0.5 SDK era explanation for why).
-http://www.longchampoutletus.us.com+* When pulling new versions of WWJava, be careful to properly reflect file deletes (keep reading for suggestions on how to do this). If you don't properly track file deletes, WWJava SDK compile errors will be extremely difficult to identify.
-http://www.philippplein-outlet.com+* Use [http://winmerge.org/ WinMerge] (or some similar directory comparison tool) to figure out which files have been deleted since your prior committed version of the WWJava SDK.
-http://www.polooutlets.us.org+* Delete these files (if any) from Mercurial on your source tree. You will commit these deletes later in a step below, once you've confirmed that the build works.
-http://www.katespadeonlineoutlet.us.com+* Copy and replace the new source tree onto the existing (Mercurial controlled) source tree.
-http://www.canadagoosesalejackets.us.com+* In NetBeans, Clean & Build the project.
-http://www.hermes.us.org+* Verify that only expected warnings occur - fix these as you wish against your local Mercurial repository.
-http://www.ralphlaurensale-clearance.org.uk+* Commit the new/modified/deleted source files to Mercurial, using the WWJava published release version number in your commit comment.
-http://www.burberry-outlet-canada.ca+ 
-http://www.cheapoakleysunglassesofficial.us.com+==(0.5 SDK era) Compiling and running the SDK examples==
-http://www.cheapraybans.com.co+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.
-http://www.air-max2018.us.com+ 
-http://www.red-bottoms.us.com+* Unzip the SDK
-http://www.pandorajewelrypandora.us.com+* 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.
-http://www.yeezyboost-350.us.com+* Rename WorldWind's 'build.xml' to something else (build_ww.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).
-http://www.canadagoosejacketscanada.ca+* 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'.
-http://www.uggbootsonline.us+* 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.jar)
-http://www.canadagoosesaleoutlet.us.com+ 
-http://www.uggbootswomen.us.com+You can now run any of the examples by right-clicking them and selecting 'Run File' from the contextual menu.
-http://wwwcanadagoose-jacketsuk.com.co+ 
-http://www.polooutlet.in.net+==(0.1 SDK era) Original entry from Geertjan's log when the 0.1 SDK was initially released==
-http://www.canadagooseoutletus.us.com+ 
-http://www.airmax-2018.com+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 [http://www.netbeans.org/ NetBeans IDE]:
-http://www.adidasyeezyboost-350.us.com+ 
-http://www.hermes-handbags.us+*[[World Wind Java Download|Download]] and unzip the World Wind Java SDK.
-http://www.michaelkorsoutlet.us.org+*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.
-http://www.cheapnfljerseysnflwholesale.us.com+*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.
-http://www.uggsboots.name+*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:
-http://www.adidas-yeezyshoes.us.com+ -Djava.library.path=/path/to/unzipped/nasa/download
-http://www.ralphlauren-outlet.me.uk+*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:
-http://www.ralphlauren.me.uk+[[Image:nasa1.png]]
-http://www.pandora.us.com+*Create a helper class, with this very basic content:
-http://www.michaelkorsfactoryoutletsale.us.com+ public class WWHelper {
-http://www.pandora-charms.us.org+
-http://www.uggsoutletonlines.us.com+ private WWHelper() {
-http://www.timberland-outlets.us+ }
-http://www.cheapnfljerseysofficial.us.com+
-http://www.harden-vol1.com+ public static void setup(final WorldWindow ww) {
-http://www.uggoutletstore.name+ Model m = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME);
-http://www.toryburchoutletonline.com.co+ ww.setModel(m);
-http://www.polo-ralphlauren.in.net+ }
-http://www.canadagooseoutlet.name+ }
-http://www.ralphlaurenoutlet.in.net+*Then, back in the JFrame, add this line after the ''initComponents()'', in the constructor:
-http://www.michael-korsoutlet.ca+ WWHelper.setup(worldWindowGLCanvas1);
-http://www.uggoutletonline.name+*Run the application. Let the JFrame's constructor be the application's starting point. Here's what you should see:
-http://www.cheapjordans.in.net+[[Image:nasa2.png]]
-http://www.nikeoutlet.us.com+*Use the mouse, or your keyboard's alternative, for panning and zooming:
-http://www.nikeairmax.in.net+[[Image:nasa3.png]]
-http://www.uggs-boots.us.org+ 
-http://www.yeezyboost.org.uk+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.
-http://www.nike-store.us.com+ 
-http://www.uggsaustralia.fr+''Source: [http://blogs.sun.com/geertjan/entry/hello_nasa_world_wind Geertjan's Weblog]''
-http://www.uggsoutlet.cc+ 
-http://www.coachfactoryoutlet-storeonline.us.com+ 
-http://www.moncler-outlet.us.org+[[Category:WWJ Dev Documentation]]
-http://www.air-jordans.us.com+
-http://www.pandoracharms.us.com+
-http://www.oakley.nom.co+
-http://www.coachhandbagsoutlet.us.com+
-http://www.moncleroutlets.us.org+
-http://www.uggscanadaugg.ca+
-http://www.christianlouboutinoutlet.us+
-http://www.outletlouisvuitton.us.com+
-http://www.jordanretro.name+
-http://www.guccihandbagsoutlet.us.com+
-http://www.oakleysunglassesforwomen.us.com+
-http://www.michael-korshandbags.me.uk+
-http://www.outletuggoutlet.us.com+
-http://www.uggs-boots.fr+
-http://www.salvatoreferragamoshoes.us.com+
-http://www.katespadeoutletstoreonline.us.com+
-http://www.canadagoosejacketssale.com.co+
-http://www.canadagooseukjackets.me.uk+
-http://www.nikezoom.us+
-http://www.airmax-97.us+
-http://www.uggoutlet-store.us+
-http://www.canadagooseoutlet-jackets.us+
-http://www.timberlandbootsoutlets.us.com+
-http://www.coachoutlet-onlinesale.us.com+
-http://www.raybansunglasses.net.co+
-http://www.ralph-laurenoutlet.com.co+
-http://www.pandoracharmssaleclearance.uk+
-http://www.canadagooseoutletjackets.com.co+
-http://www.mbtshoessale.us.com+
-http://www.coachoutletstoreonline.com.co+
-http://www.adidasnmd-shoes.us+
-http://www.kate-spade.us.com+
-http://www.louisvuittonoutlet.us.org+
-http://www.michaelkorsoutletclearance.in.net+
-http://www.adidasshoe.us.com+
-http://www.canadagooseoutletjackets.us+
-http://www.michaelkorsoutletonlinemichaelkors.us.com+
-http://www.uggsoutletclearance.us.com+
-http://www.canadagoose-outlet.name+
-http://www.canadagoosejacketsoutlet.name+
-http://www.ralphlaurenoutletonline-polo.us.com+
-http://www.adidas-nmd.us.com+
-http://www.adidasnmd.us.org+
-http://www.katespade.in.net+
-http://www.louboutinshoes.in.net+
-http://www.monclerjacketsoutlet.in.net+
-http://www.uggsoutletstoreonline.us.com+
-http://www.hermesbirkin.in.net+
-http://www.adidas-shoes.us.com+
-http://www.poloralphlaurenoutletonline.us.com+
-http://www.michaelkors-outlet.ca+
-http://www.coachfactory-outletonline.us.org+
-http://www.nikeoutlet.in.net+
-http://www.uggsbootsonline.us.com+
-http://www.cheapmlbjerseyschina.us.com+
-http://www.oakleysunglassessalecheap.us.com+
-http://www.katespadehandbagsclearance.us.com+
-http://www.nikeshoes.in.net+
-http://www.fitflopssale-clearance.us.org+
-http://www.longchamp-outlet.us.com+
-http://www.pandoracharms.name+
-http://www.outletcanadagoose.us+
-http://www.airmax-97.us.com+
-http://www.raybansunglassessalecheap.us.com+
-http://www.uggbootssales.us.com+
-http://www.cheapoakleysunglasses.com.co+
-http://www.coachoutlet-online.us.org+
-http://www.michaelkorsoutletshopping.us.com+
-http://www.ralphlaurenoutletpolo.org.uk+
-http://www.canadiangoose.us.com+
-http://www.pandora-outlet.us.com+
-http://www.jordanshoesforsale.us.com+
-http://www.michaelkorsoutlet1.us.com+
-http://www.ralph-laurenoutlet.org.uk+
-http://www.ralph-laurenuk.org.uk+
-http://www.coach-outletonline.us.org+
-http://www.timberlandbootsoutlet.us.com+
-http://www.raybansunglasse.com+
-http://www.adidas-superstar.us.com+
-http://www.northface-jackets.us.com+
-http://www.coachoutletcanada.ca+
-http://www.canadagooseukjackets.org.uk+
-http://www.michael-korsoutlets.us.com+
-http://www.ralphlaurenoutletsale.us.com+
-http://www.nikeshoes.us.com+
-http://www.supremeclothing.us.org+
-http://www.thenorthfacejacketsoutlet.us.com+
-http://www.monclerjacketsuk.org.uk+
-http://www.uggoutletonlines.us+
-http://www.doudounemonclerpascher.fr+
-http://www.coachoutletus.us.com+
-http://www.outletcoachoutlet.us.com+
-http://www.ugg-boots.net.co+
-http://www.airjordanshoes.in.net+
-http://www.cheapjordans-shoes.us.com+
-http://www.cheapjordanshoes.us.com+
-http://www.raybanssunglassesoutlet.us.com+
-http://www.moncleroutlet.me.uk+
-http://www.michaelkorsoutlet.co.uk+
-http://www.uggbootsoutletstores.us.com+
-http://www.oakley--sunglasses.us.org+
-http://www.louisvuitton-outlet.us.com+
-http://www.cheapjordan-shoes.in.net+
-http://www.uggsoutletus.us.com+
-http://www.adadassuperstar.com+
-http://www.cheapjordans.com.co+
-http://www.catboots.us+
-http://www.ralphlaurenoutletmalls.us.com+
-http://www.vuittonlouis.us.com+
-http://www.cheapuggs.com.co+
-http://www.burberryoutlet.in.net+
-http://www.christianlouboutinshoes.us.org+
-http://www.michaelkorsoutletonlineclearance.in.net+
-http://www.outletcoachonline.us.com+
-http://ugg.bootsoutlet.us.com+
-http://www.valentinoshoesoutlets.us.com+
-http://www.pandoracharmssale-clearance.us.com+
-http://www.fitflopssale.us.com+
-http://www.nfljerseyscheapwholesale.us.com+
-http://www.coach-factory-outlet.us.org+
-http://www.yeezyboost.us.com+
-http://www.thenorthface.us.com+
-http://www.2017nikeairmax.us+
-http://www.monclerjacketssale.us.com+
-http://www.supremenewyork.us.com+
-http://www.coachfactoryonlineoutlet.com.co+
-http://www.coach-factoryoutletonline.us.org+
-http://www.pandorastore.us.com+
-http://www.ralphlauren-outletpolo.us.com+
-http://www.coachoutletonlinecoachfactoryoutlet.us.com+
-http://www.coach-factoryoutlet-online.us.com+
-http://www.ugg-outlets.us+
-http://www.canadagoosejacketscoats.org.uk+
-http://www.fredperrypoloshirts.us+
-http://www.adidascampusshoes.us+
-http://www.coachoutletmalls.us.com+
-http://www.canadagoosejackets-outlet.us+
-http://wwwmonclerjacketsuk.com.co+
-http://www.ugg-outletstores.us.com+
-http://www.ferragamo-outlet.us.com+
-http://www.adidas.us.com+
-http://www.redbottomsshoes.us.com+
-http://www.burberry.us.com+
-http://www.canadagoosejacketsofficial.us.com+
-http://www.korsmichaeloutlet.us.com+
-http://www.coachoutletsonlines.us.com+
-http://www.michael-kors-handbags.us.org+
-http://www.airjordans.us.com+
-http://www.canadagooseoutletjackets.us.com+
-http://www.supreme-clothing.us.com+
-http://www.uggsbootscanada.ca+
-http://www.pandora-jewelryoutlet.us.com+
-http://www.longchamphandbagsuk.org.uk+
-http://www.coachfactory-outletstore.us.com+
-http://www.poloralphlaurenoutletpolo.us.com+
-http://www.uggoutlet-clearance.us.com+
-http://www.uggbootsoutletsale.us.com+
-http://www.northfacejacketssale.us.com+
-http://www.canadagooseoutletcanada.com.co+
-http://www.columbiasportswear.us.com+
-http://www.canadagoosesoutlet.ca+
-http://www.canadagooseoutletjackets.ca+
-http://www.coachoutletstoreonlineclearances.in.net+
-http://www.burberryoutletsale.com.co+
-http://www.cheapuggssale.com.co+
-http://www.mulberryoutlet.org.uk+
-http://www.coach-outlets.us.com+
-http://www.hermesbag.us.com+
-http://www.yeezyboost-350.co.uk+
-http://www.northfaceoutlet.us.com+
-http://www.supremeclothing.org.uk+
-http://www.uggsoutlets.name+
-http://www.adidas-yeezyboost.us.com+
-http://www.coachfactory-outlet.us.com+
-http://www.canadagooseoutlets.us+
-http://www.adidas-outlet.us.com+
-http://www.canadagooseclothing.us.com+
-http://www.michaelkorsoutlets.us.com+
-http://www.rayban-sunglasseoutlet.us.com+
-http://www.northfacejacketsoutlet.com.co+
-http://www.birkenstocks.us+
-http://www.philipppleinshirt.com+
-http://www.jacketscanadagoose.org.uk+
-http://www.fitflops-sale-clearance.us.com+
-http://www.cheapuggs.net.co+
-http://www.adidasoutlet.us.com+
-http://www.canadagooseoutletonlines.us+
-http://www.uggsbootsaustralia.us.com+
-http://www.coachfactoryoutletsonlines.us.com+
-http://www.coachoutlets.us.org+
-http://www.cheapuggboots.us.com+
-http://www.michael-korsoutlet.us.com+
-http://www.moncler-outlets.us.com+
-http://www.pandoracharms-uk.org.uk+
-http://www.pandoracharms.com.co+
-http://www.uggs-boots.us+
-http://www.adidasyeezyshoes.us.com+
-http://www.canadagooseoutletstores.us+
-http://www.nikeoutletonline.us.com+
-http://www.uggshoes.us.com+
-http://www.coachcanadaoutlet.ca+
-http://www.mbtshoes.name+
-http://www.pandorajewelryoutlet.in.net+
-http://www.cheapuggs-boots.us.com+
-http://www.outletcanadagooseoutlet.us.com+
-http://www.moncleroutletonlines.us.com+
-http://www.guccioutlets.us.org+
-http://www.uggoutlets.name+
-hll20180112+

Current revision

Contents

[edit] (0.6 SDK era) Tracking WWJava SDK versions from NetBeans

Chiss' instructions (0.5 SDK era, see below) for initial NetBeans build remain an excellent help for building a 0.6 WWJava SDK using NetBeans 6.9.1 and 32-bit version of the JDK 1.6.0_22 on a Windows 7 64-bit machine. If you're building the WWJava SDK for the first time, follow those instructions and add 'gdal.jar' at the same time you're adding 'gluegen-rt.jar' and 'jogl.jar' via the 'Add JAR/Folder' button.

The WWJava team doesn't publish a CM repository as of December 2010. It uses Subversion (SVN) internally. There's plenty of discussion on this subject in the forums if you're interested. If you'd like to effectively track WWJava builds releases externally using Mercurial, keep reading this section. These instructions assume you're familiar with Mercurial, its integration with NetBeans, and that you've already committed an initial version of the WWJava SDK to a Mercurial repository inside NetBeans:

  • Download the desired SDK version from the WWJava releases site.
  • Extract the zip file to a local directory, not in your Mercurial source tree yet.
  • Rename top level 'build.xml' to 'build_ww.xml' (see the 0.5 SDK era explanation for why).
  • When pulling new versions of WWJava, be careful to properly reflect file deletes (keep reading for suggestions on how to do this). If you don't properly track file deletes, WWJava SDK compile errors will be extremely difficult to identify.
  • Use WinMerge (or some similar directory comparison tool) to figure out which files have been deleted since your prior committed version of the WWJava SDK.
  • Delete these files (if any) from Mercurial on your source tree. You will commit these deletes later in a step below, once you've confirmed that the build works.
  • Copy and replace the new source tree onto the existing (Mercurial controlled) source tree.
  • In NetBeans, Clean & Build the project.
  • Verify that only expected warnings occur - fix these as you wish against your local Mercurial repository.
  • Commit the new/modified/deleted source files to Mercurial, using the WWJava published release version number in your commit comment.

[edit] (0.5 SDK era) Compiling and running the SDK examples

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.

  • Unzip the SDK
  • 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.
  • Rename WorldWind's 'build.xml' to something else (build_ww.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).
  • 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'.
  • 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.jar)

You can now run any of the examples by right-clicking them and selecting 'Run File' from the contextual menu.

[edit] (0.1 SDK era) Original entry from Geertjan's log when the 0.1 SDK was initially released

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:

Image:nasa1.png

  • 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:

Image:nasa2.png

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

Image:nasa3.png

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.

Source: Geertjan's Weblog

Personal tools