"Fossies" - the Fresh Open Source Software Archive

Member "jacl1.4.1/docs/TclJava/JavaLoadCmd.html" (25 Jan 2000, 1604 Bytes) of package /linux/misc/old/jacl1.4.1.tar.gz:

Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. Alternatively you can here view or download the uninterpreted raw source code. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

The java::load Command


java::load ?-classpath pathList? extensionName

The java::load command loads extensions into the Java VM. An extension is a Java class that specifies a set of class files to load into the VM, as well as specifying how the Tcl interpreter should interact with these classes. The primary use for this function is to load new Tcl commands into the interpreter, but it may also be used to load classes into the VM that can be used by the Reflection API.

The argument extensionName is the name of the class file to load into the VM. The class referenced by extensionName must be a subclass of tcl.lang.Extension. All subclasses of Extension must implement the abstract init method, which is responsible for loading commands into the Tcl interpreter or loading any additional classes into the java VM. To load classes that do not subclass Extension into the VM, use the java::new, java::class or java::defineclass commands.


Load an extension stored in /home/user/Foo.class;

java::load -classpath /home/user Foo


Currently '~' substitution is not performed on Unix systems. The path must be absolute or relative from the current directory.

Copyright © 1997-1998 Sun Microsystems, Inc.