PDA

View Full Version : Offline MilStd2525-symbols.zip


Unregistered
04-19-2012, 05:08 PM
I'm trying to get worldwind to display MilStd2525 symbols from a local zip archive. I'm very new to worldwinds and java so bear with me..

I opened the worldwind.jar file in winzip and added the following line to config/worldwind.xml.

<Property value="jar:file:milstd2525-symbols.zip!" name="gov.nasa.worldwind.avkey.MilStd2525IconR etrieverPath"/>

I then added the milstd2525-symbols.zip to the root of the jar file, next to the com, config, gov, META-INF, etc. folders.

When I try to launch my app, I'm getting the following exception. Any idea what I'm doing wrong??

Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
at gov.nasa.worldwind.Configuration.<init>(Unknown Source)
at gov.nasa.worldwind.Configuration.<clinit>(Unknown Source)
at gov.nasa.worldwind.WorldWind.createConfi gurationComponent(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)
at gov.nasa.worldwind.awt.WorldWindowGLCanv as.<init>(Unknown Source)
at TestMap.Map.<init>(Map.java:18)
at TestMap.TestMap.<init>(TestMap.java:45)
at TestMap.TestMap$1.run(TestMap.java:20)
at java.awt.event.InvocationEvent.dispatch( Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Un known Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivile ged(Native Method)
at java.security.ProtectionDomain$1.doInter sectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknow n Source)
at java.awt.EventDispatchThread.pumpOneEven tForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsF orFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsF orHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents( Unknown Source)
at java.awt.EventDispatchThread.pumpEvents( Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at gov.nasa.worldwind.Configuration.getStri ngValue(Unknown Source)
at gov.nasa.worldwind.Configuration.getInte gerValue(Unknown Source)
at gov.nasa.worldwind.Configuration.getInte gerValue(Unknown Source)
at gov.nasa.worldwind.util.Logging.<clinit>(Unknown Source)
... 24 more

nlneilson
04-20-2012, 11:20 PM
It's a bit more involved than that.

Try the similar examples that are in the SDK.

You will probably need to unzip the symbols.

In Win placing stuff in the root of the jar file may work but in many Linux OSs it may not.

pabercrombie
05-07-2012, 11:05 PM
That error indicates that there's something wrong with your config file. But it sounds like you're doing more work than you need to. You do not need to extract the contents of the symbol jar, and you do not need to unpack wordwind.jar. Here's what you want to do:

1) Download milstd2525-symbols.zip and place it in the same directory as worldwind.jar.
2) Copy the default worldwind.xml from ww-download-dir/src/config to your-app-working-dir/config/worldwind.xml.
3) Set the location of the symbols in worldwind.xml:
<Property name="gov.nasa.worldwind.avkey.MilStd2525IconR etrieverPath" value="jar:file:milstd2525-symbols.zip!"/>


By default, World Wind attempts to load the configuration file from config/worldwind.xml. You can tell WW to use a different file by setting the gov.nasa.worldwind.config.file parameter when you start your application (i.e. -Dgov.nasa.worldwind.config.file=/path/to/worldwind.xml). I would recommend keeping a configuration file external to worldwind.jar instead of modifying the file inside of the jar.