FileDocCategorySizeDatePackage
JarClassLoader.javaAPI DocGlassfish v2 API4515Fri May 04 22:35:58 BST 2007com.sun.enterprise.util

JarClassLoader

public final class JarClassLoader extends com.sun.enterprise.loader.EJBClassLoader

Fields Summary
static final Logger
_logger
private static final boolean
debug
Constructors Summary
public JarClassLoader()

    // END OF IASRI 4679641
  
      
        super(ConnectorClassLoader.getInstance());
    
public JarClassLoader(String jarName)

 
        super(ConnectorClassLoader.getInstance());
        addJar(jarName); 
    
Methods Summary
public voidaddDir(java.net.URL url)

	/** IASRI 4660742
	if(debug) 
	    System.err.println("JarClassLoader.addDir: url=" + url);
	**/
	//START OF IASRI 4660742
	if(debug && _logger.isLoggable(Level.FINE)) {
	    _logger.log(Level.INFO,"JarClassLoader.addDir: url=" + url);
  }
	//END OF IASRI 4660742
        appendURL(url);
    
public synchronized voidaddJar(java.lang.String jarName)
Add a JAR to the list of JARs we search for a class's bytecodes.

	// The URL is OS specific. On Solaris, file:/xyz and file:///xyz work.
	// On NT, file://c:/xyz and file:/c:/xyz work.  
	// So we let the java.io.File create a URL for us.
	File file = new File(FileUtil.getAbsolutePath(jarName));
	/** IASRI 4660742
	if(debug) 
	    System.err.println("JarClassLoader.addJar: url=" + file.toURL());
	**/
	//START OF IASRI 4660742
	if(debug && _logger.isLoggable(Level.FINE)) {
	    _logger.log(Level.FINE,"JarClassLoader.addJar: url=" + file.toURL());
  }
	//END OF IASRI 4660742

	appendURL(file);
    
public java.lang.StringgetClassPath()

deprecated
use getClasspath()

        return getClasspath();
    
public final java.lang.StringgetClasspath()

	String cpath = "";
	URL[] urls = getURLs();
	String sep = File.pathSeparator;

	for(int i=0; i < urls.length; ++i) {
	    cpath = cpath + sep + urls[i].getFile(); 
	}

	return cpath;