I use WorldWindGlCanvas in a netbeans TopComponent. When top component is opened WorldWInd try to connect to some url (for example worldwind20.arc.nasa.gov). If there is not internet connection UnknowHostException is occured and a dialog is shown to show this exception. I want to catch this exception. Note that I know that worldwind could work offline and I can set it work offline but I want to set worldwind online so that it use online tiles when internet connection is provided and it uses cached tiles if there is no internet connection. Is there any way to catch this exception?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Looking at the source code for World Wind, there doesn't appear to be a way to catch that exception.
Upon manually disconnecting my Internet connection, I received a stack trace of the following:
Based on that stack trace, I investigated a few source files:
URLRetriever.java:
SessionCacheUtils.java:
It appears to be handled internally, and thus you seem to be out of luck.