--- old/src/share/classes/sun/net/ftp/FtpClientProvider.java Fri Dec 2 11:21:54 2011 +++ new/src/share/classes/sun/net/ftp/FtpClientProvider.java Fri Dec 2 11:21:54 2011 @@ -27,7 +27,7 @@ import java.security.AccessController; import java.security.PrivilegedAction; import java.util.ServiceConfigurationError; -//import sun.misc.Service; +//import java.util.ServiceLoader; /** * Service provider class for FtpClient. @@ -79,20 +79,22 @@ } private static boolean loadProviderAsService() { - // Iterator i = Service.providers(FtpClientProvider.class, - // ClassLoader.getSystemClassLoader()); - // while (i.hasNext()) { - // try { - // provider = (FtpClientProvider) i.next(); - // return true; - // } catch (ServiceConfigurationError sce) { - // if (sce.getCause() instanceof SecurityException) { - // // Ignore, try next provider, if any - // continue; - // } - // throw sce; - // } - // } +// Iterator i = +// ServiceLoader.load(FtpClientProvider.class, +// ClassLoader.getSystemClassLoader()).iterator(); +// +// while (i.hasNext()) { +// try { +// provider = i.next(); +// return true; +// } catch (ServiceConfigurationError sce) { +// if (sce.getCause() instanceof SecurityException) { +// // Ignore, try next provider, if any +// continue; +// } +// throw sce; +// } +// } return false; }