private static Class<?> loadColtClass(String className) 
            throws ClassNotFoundException { 
        try {
            Class<?> clazz = 
                Class.forName(className);
            return clazz;
            
        } catch (ClassNotFoundException cnfe) {

            // If we see a CNFE, don't immediately give up.  It's most likely
            // that this class is being invoked from inside a .jar, so see if
            // the user specified where COLT is manually.
            String coltProp = System.getProperty("colt.path");
            
            // if not, rethrow since the class does not exist
            if (coltProp == null)
                throw cnfe;

            File coltJarFile = new File(coltProp);
            try {
                // Otherwise, try to load the class from the specified .jar
                // file.  If the ClassLoader for loading all COLT classes has
                // not yet been initialized, do so now.  We need to maintain
                // only one class loader for all COLT classes, otherwise the
                // reflective invocation will fail; the constructor type system
                // does not work correctly if the parameter objects have been
                // loaded from a different class loader. --jurgens
                if (coltClassLoader == null) {
                    coltClassLoader = 
                        new java.net.URLClassLoader(
                        new java.net.URL[] { coltJarFile.toURI().toURL() });
                }

                Class<?> clazz = Class.forName(className, true,
                                               coltClassLoader);
                return clazz;
            } catch (Exception e) {
                // fall through and rethrow original
            }
            
            throw cnfe;
        }
    }
private static Class < ? > loadColtClass ( String className ) throws ClassNotFoundException { try { Class < ? > clazz = Class . forName ( className ) ; return clazz ; } catch ( ClassNotFoundException cnfe ) { String coltProp = System . getProperty ( "colt.path" ) ; if ( coltProp == null ) throw cnfe ; File coltJarFile = new File ( coltProp ) ; try { if ( coltClassLoader == null ) { coltClassLoader = new java . net . URLClassLoader ( new java . net . URL [ ] { coltJarFile . toURI ( ) . toURL ( ) } ) ; } Class < ? > clazz = Class . forName ( className , true , coltClassLoader ) ; return clazz ; } catch ( Exception e ) { } throw cnfe ; } }
Reflectively loads the COLT-related class.  If the class is not
immediately loadable from the existing classpath, then this method will
attempt to use the {@code colt.path} system environment variable to load
it from an external resource.