"Fossies" - the Fresh Open Source Software archive

Member "jacl1.4.1/docs/TclJava/JavaLoadCmd.html" (25 Jan 2000, 1604 Bytes) of archive /linux/misc/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 source code. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.


The java::load Command


Usage:

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.

EXAMPLE:

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

java::load -classpath /home/user Foo

BUGS:

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.