--- old/src/java.xml.ws/share/classes/javax/xml/ws/spi/FactoryFinder.java 2015-10-16 12:58:47.000000000 +0200 +++ new/src/java.xml.ws/share/classes/javax/xml/ws/spi/FactoryFinder.java 2015-10-16 12:58:47.000000000 +0200 @@ -27,8 +27,6 @@ import java.io.*; -import java.nio.file.Files; -import java.nio.file.Path; import java.nio.file.Paths; import java.util.Properties; import java.util.logging.Level; @@ -115,19 +113,19 @@ private static Object fromJDKProperties(String factoryId, String fallbackClassName, ClassLoader classLoader) { - Path path = null; + File f = null; try { String JAVA_HOME = System.getProperty("java.home"); - path = Paths.get(JAVA_HOME, "conf", "jaxws.properties"); + f = Paths.get(JAVA_HOME, "conf", "jaxws.properties").toFile(); // to ensure backwards compatibility - if (!Files.exists(path)) { - path = Paths.get(JAVA_HOME, "lib", "jaxws.properties"); + if (!f.exists()) { + f = Paths.get(JAVA_HOME, "lib", "jaxws.properties").toFile(); } - if (!Files.exists(path)) { + if (f.exists()) { Properties props = new Properties(); - try (InputStream inStream = Files.newInputStream(path)) { + try (InputStream inStream = new FileInputStream(f)) { props.load(inStream); } String factoryClassName = props.getProperty(factoryId); @@ -135,7 +133,9 @@ fallbackClassName, classLoader, EXCEPTION_HANDLER); } } catch (Exception ignored) { - logger.log(Level.SEVERE, "Error reading JAX-WS configuration from [" + path + + String absolutePath = f != null ? f.getAbsolutePath() : "null"; + logger.log(Level.SEVERE, "Error reading JAX-WS configuration from [" + + absolutePath + "] file. Check it is accessible and has correct format.", ignored); } return null;