The process of resolving a class is done by searching for the class in the following locations.
If a path in pathList or env(TCL_CLASSPATH) is not an absolute path, it is assumed to be a relative path from the interpreter's current directory.
If the system class loader fails to load the class (step ), then the class was not found in the CLASSPATH list. A security check is done to assure that the class does not have access to package-protected variables. If the extension name begins with "java." or "tcl.", a Tcl error is generated.
Steps  and  only use the paths in pathList or env(TCL_CLASSPATH) to locate the class file. If the path is a directory, the loader looks in that directory for the class file. If the path is a jar file, the jar file is inspected to see if it contains the class. Steps  and  search pathList and env(TCL_CLASSPATH) again. If a path in the list is a directory, the loader looks for jar files in that directory, inspecting any jar files found to locate the class. The loader is capable of extracting files from a compressed jar file.
Any class referenced by extensionName will also be loaded into the VM. This includes classes used in new expressions as well as those whose instances are reported (i.e. the use of static methods.) Due to the recursive nature of class loading, any class referenced must be located in the CLASSPATH, env(TCL_CLASSPATH) or pathList. If a class cannot be located in one of the three locations, a Tcl error is generated.
Currently it is not possible to unload or reload an extension.
Copyright © 1997-1998 Sun Microsystems, Inc.