June 10, 2009

Setting up World Wind, JOGL and Eclipse Galileo

World Wind lets you zoom from satellite altitude into any place on Earth. It is like an open source Google Earth. To run the examples, and to play with World Wind you should have a OpenGL compatible graphics card. World Wind comes in two flavors, namely for .NET and for Java.

You can download the Java release from here.
For Java you will also need JOGL libraries for OpenGL support. JOGL is in fact JNI interfaces for direct access to OpenGL hardware.

You can get JOGL from here. Choose your platform as it is available for many platforms like linux and mac.

I wanted to compile world wind from scratch. I installed latest release candidate of Eclipse Galileo and created a new java project and used the World Wind src directory as the source.
To compile the WOrld WInd you should add the JOGL libraries as external jars to the project.
This will be enough to compile the World Wind source tree but not enough to run the examples. To run the examples you should point the JNI interface library path to the JVM [1]. Create a "Run Profile" and in the Arguments tab -> VM arguments paste this.

-Djava.library.path=E:\jogl-1.1.1-windows-i586\lib

The path should change according to your JOGL installation directory.

That's it.

References:
[1] http://www.jagoharry.co.uk/using-jogl-and-swt-in-eclipse-java-projects/
[2] https://jogl.dev.java.net/servlets/ProjectDocumentList?folderID=9260&expandFolder=9260&folderID=0
[3] http://worldwind.arc.nasa.gov/