public static InputStream getForkStream(String config) throws IOException { InputStream configStream = null; try { configStream = new FileInputStream(config); } catch (FileNotFoundException | AccessControlException fnfe) { // catching ACE fixes http://jira.jboss.com/jira/browse/JGRP-94 } // Check to see if the properties string is a URL. if (configStream == null) { try { configStream = new URL(config).openStream(); } catch (MalformedURLException mre) { } } // Check to see if the properties string is the name of a resource, e.g. udp.xml. if (configStream == null) configStream = Util.getResourceAsStream(config, ConfiguratorFactory.class); return configStream; }