1 2 24 25 package com.sun.enterprise.connectors.util; 26 27 import com.sun.enterprise.connectors.*; 28 import com.sun.enterprise.util.*; 29 import java.io.IOException ; 30 import java.lang.ClassLoader ; 31 import com.sun.logging.LogDomains; 32 import java.util.logging.*; 33 import java.io.File ; 34 import java.net.*; 35 36 37 42 43 public class ConnectorClassLoaderUtils { 44 45 static Logger _logger = LogDomains.getLogger(LogDomains.RSR_LOGGER); 46 47 54 55 public static ClassLoader getClassLoader(String moduleDir) { 56 try { 57 ClassLoader jcl = null; 58 jcl = ConnectorClassLoader.getInstance(); 59 File f = new File (moduleDir); 60 ((ConnectorClassLoader)jcl).appendURL(f); 61 return jcl; 62 } catch (IOException ex) { 63 _logger.log(Level.SEVERE, 64 "rardeployment.malfarmed_url_for_classloader",moduleDir); 65 } 66 return null; 67 } 68 } 69 | Popular Tags |