WorldWind Java SDK Quickstart¶
Get Started¶
WorldWind is an SDK (software development kit) that software engineers can use to build their own applications. To run a WorldWind demo application, visit the Demos page. Follow these instructions to download, run, and deploy an application using WorldWind.
- build.xml: Apache ANT build file for the WorldWind Java SDK.
- src: Contains all Java source files for the WorldWind Java SDK.
- lib-external/gdal: Contains the GDAL native binaries libraries that may optionally be distributed with WorldWind.
- WorldWind Developer’s Guide: http://goworldwind.org/
- WorldWind Main Website: http://worldwind.arc.nasa.gov/java/
- WorldWind Forum: http://forum.worldwindcentral.com/forumdisplay.php?f=37
- WorldWind API Documentation: http://builds.worldwind.arc.nasa.gov/worldwind-releases/2.0/docs/api/index.html
- WorldWind Bug Base: http://issues.worldwind.arc.nasa.gov/jira/browse/WWJ
Running a Basic Demo Application¶
- To run the basic demo:
- Open a terminal.
- cd to the WorldWind release folder.
- chmod +x run-demo.bash
- ./run-demo.bash gov.nasa.worldwindx.examples.ApplicationTemplate
Create and Run Your Application Using WorldWind¶
Create an app by reviewing the programming examples in WorldWind/src/gov/nasa/worldwindx/examples.
Run:
java -Xmx1024m -cp MyApp.jar:worldwind.jar:worldwindx.jar:jogl-all.jar:gluegen-rt.jar:gdal.jar worldwinddemo.MyBasicDemo
Note: All *.dll, *.jnilib, and *.so files in the WorldWind folder must be in the same folder as MyApp.jar.
Deploy an Application Using Java Web Start¶
1. Create a Java Web Start Application JNLP File
Modify the template JNLP file WorldWind/webstart/JavaWebStartTemplate.jnlp to fit your app.
WorldWind Core Library (required):
<extension name="worldwind" href="http://worldwind.arc.nasa.gov/java/2.0.0/webstart/worldwind.jnlp"/>
WorldWind Extensions Library (required if your app uses the gov.nasa.worldwindx package):
<extension name="worldwindx" href="http://worldwind.arc.nasa.gov/java/2.0.0/webstart/worldwindx.jnlp"/>
GDAL Library (optional, include if your app uses WorldWind?s data import feature):
<extension name="gdal" href="http://worldwind.arc.nasa.gov/java/2.0.0/webstart/gdal.jnlp"/>
Deploy an Applet Using Java Web Start¶
1. Create a Java Web Start Applet JNLP File Modify the template JNLP file WorldWind/webstart/JavaWebStartAppletTemplate.jnlp to fit your applet.
<script src="http://www.java.com/js/deployJava.js"></script>
<script>
var attributes = {id:'myApplet', mayscript:'true', width:'800px', height:'600px'};
var parameters = {jnlp_href:'MyApp.jnlp'};
deployJava.runApplet(attributes, parameters, '1.6'); // runApplet automatically looks for JRE 1.6+
</script>