WorldWind released the open-source Java SDK earlier. The installation and testing steps are as follows:
1. Download WorldWind Java SDK
: Http://builds.worldwind.arc.nasa.gov/download.asp
After decompression, you can obtain jogl. jar, gluegen-rt.jar, WorldWind. jar, gluegen-rt.dll, jogl. dll, jogl_awt.dll, jogl_cg.dll
2. Open eclipse and create a Java Project
1) Create the Lib folder under the project and put the three jar packages obtained in the first step into the lib directory.
2) create a folder on the computer and put the 4 DLL files obtained in step 1 into the folder.
3) Right-click jogl. jar, build path ---> Configure build path ----> click jogl. in the jar package, locate native library location-> edit and put the 2.2 file path in the location path, as shown in the image.
3. Create a Java File
Package CN. WorldWind. test;
Import gov. NASA. WorldWind. basicmodel;
Import gov. NASA. WorldWind. AWT. worldwindowglcanvas;
Public class helloworld {
Public static class appframe extends javax. Swing. jframe {
/**
*
*/
Private Static final long serialversionuid = 1l;
Public appframe (){
Worldwindowglcanvas WWD = new worldwindowglcanvas ();
WWD. setpreferredsize (New java. AWT. dimension (200,200 ));
This. getcontentpane (). Add (WWD, java. AWT. borderlayout. center );
This. Pack ();
WWD. setmodel (New basicmodel ());
}
}
Public static void main (string [] ARGs ){
Java. AWT. eventqueue. invokelater (New runnable (){
Public void run (){
New appframe (). setvisible (true );
}
});
}
}