World Wind Java SDK installation and development test

Source: Internet
Author: User

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 );
}
});

}

}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.