protected void loadOntology() { try { manager = OWLManager.createOWLOntologyManager(); URI physicalURI = URI.create(PREFERENCES.getOntologyURL()); // Now do the loading ontology = manager.loadOntologyFromPhysicalURI(physicalURI); manager.setPhysicalURIForOntology(ontology, physicalURI); } catch (final Exception e) { Runnable runnable = new Runnable() { public void run() { JOptionPane.showMessageDialog( null, "Could not create the ontology. (This probably happened\n" + "because the ontology could not be accessed due to network\n" + "problems.)\n" + "[" + e.getMessage() + "]", "Error", JOptionPane.ERROR_MESSAGE); System.exit(1); } }; SwingUtilities.invokeLater(runnable); } }