Nasa Worldwind SDK has some examples that I wish to run. There are two ways I am trying to run the examples provided in the SDK:
When I do option (1.) I successfully compile/run with no errors.
When I do option (2.) I successfully compile but get run time errors:
Apr 13, 2011 12:18:35 PM gov.nasa.worldwind.WorldWind createComponent
SEVERE: Exception while creating World Wind component gov.nasa.worldwind.cache.BasicDataFileStore
Apr 13, 2011 12:18:35 PM gov.nasa.worldwind.WorldWind createConfigurationComponent
SEVERE: Unable to create class for configuration key gov.nasa.worldwind.cache.BasicDataFileStore
Exception in thread "main" java.lang.ExceptionInInitializerError
at gov.nasa.worldwind.awt.WorldWindowGLCanvas.<init>(Unknown Source)
at Main2.main(Main2.java:15)
Caused by: java.lang.IllegalStateException: Unable to create class for configuration key gov.nasa.worldwind.cache.BasicDataFileStore
at gov.nasa.worldwind.WorldWind.createConfigurationComponent(Unknown Source)
at gov.nasa.worldwind.WorldWind.initialize(Unknown Source)
at gov.nasa.worldwind.WorldWind.<init>(Unknown Source)
at gov.nasa.worldwind.WorldWind.<clinit>(Unknown Source)
... 2 more
Caused by: gov.nasa.worldwind.exception.WWRuntimeException: Exception while creating World Wind component gov.nasa.worldwind.cache.BasicDataFileStore
at gov.nasa.worldwind.WorldWind.createComponent(Unknown Source)
... 6 more
Caused by: java.lang.NullPointerException
at gov.nasa.worldwind.cache.BasicDataFileStore.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
... 7 more
Due to licensing and configuration management issues, I would STRONGLY PREFER to go with Option (2.). Does anyone know how to fix these run time errors seen above?
Ok..These are my Eclipse project steps under Windows environment:
src
folder) lib
folder under this project (under the root of the project folder) lib
folder: gluegen-rt.jar, jogl.jar, worldwind.jar, jogl.dll, gluegen-rt.dll, jogl_awt.dll, jogl_cg.dll
HelloWorlWind.java
into the src
folder lib
folder into the Referenced Libraries
tree by right-clicking on each jar and select Build Path > Add to Build Path
jogl.jar
in the Referenced Libraries
tree and select Build Path > Configure Build Path
. It will pop up Properties
dialog box Properties
dialog box, go to Libraries tab
and expand jogl.jar
tree Native library location
and click Edit
button on the right. It will popup Native Library Folder Configuration
dialog box. lib
folder as the location path by clicking on Workspace...
button. Then, run HelloWorlWind.java
. It will display the glorious Worldwind Earth without any exception!
Take note: a few Worldwind example apps don't terminate the JVM after you close the GUI window.
For the ApplicationTemplate.java
to work, make sure to copy the required dependencies:
I have no problems from doing exactly what you describe in option 2, it works fine. When using a freshly downloaded copy of the WorldWind Java source code, you should do an Ant Build it before using the WorldWind.jar file. The WorldWind.jar file is not always upto date and can cause conflicts when being used.
Basically what you describe from your actions is this: It works when it is using the source code, and that it fails when it is using the compiled code.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.