A collection of tools created by the Geoscience Australia (GA) Movies and 3D Visualisation (M3DV) team. The tools are built around the NASA World Wind Java SDK, an open-source virtual globe toolkit.
public static void openDefault(ThemeOpenDelegate delegate)
{
URL url = ThemeOpener.class.getResource("/config/DefaultTheme.xml");
try
{
InputStream is = url.openStream();
Element element = XMLUtil.getElementFromSource(is);
Theme theme = ThemeFactory.createFromXML(element, url);
if (theme == null)
{
throw new Exception("Could not create theme from XML document");
}
//System.out.println("-theme-"+theme.getName()); // no name
// System.out.println(theme.getDatasets().size()+" --size ");
delegate.opened(theme, element, url);
}
catch (Exception e)
{
e.printStackTrace();
JOptionPane.showMessageDialog(null, "Could not open default theme: " + e.getLocalizedMessage(), "Error",
JOptionPane.ERROR_MESSAGE);
}
}
issue : Exception occurs and JOptionPane dialog opens with "Could not open default theme :"
Importantly DefaultTheme.xml exists at that specific location too and this happens on my machine
OS : Ubuntu
Java : jdk1.7.21
public static void openDefault(ThemeOpenDelegate delegate) { URL url = ThemeOpener.class.getResource("/config/DefaultTheme.xml"); try { InputStream is = url.openStream(); Element element = XMLUtil.getElementFromSource(is);
issue : Exception occurs and JOptionPane dialog opens with "Could not open default theme :" Importantly DefaultTheme.xml exists at that specific location too and this happens on my machine OS : Ubuntu Java : jdk1.7.21