The java::field command is used to manipulate public fields from Tcl. The objOrClass argument specifies either a fully qualified name of the declaring class of the field to access, or an object handle. The field argument specifies which field to manipulate. If an additional value parameter exists, then the field will be set to value, otherwise the current value of the field is returned. Multiple fields may be set via additional parameters by alternating field signatures and values. A full field signature is is required to specify shadowed fields of superclasses.
% java::field Integer MAX_VALUE
2147483647
The java::field command also supports getting the compiler
simulated class field for a Class. This is the preferred method
of getting a handle to a java.lang.Class
object given a class name.
% set cl [java::field java.util.Hashtable class]
% java::info class $cl
java.lang.Class
Copyright © 1997-1998 Sun Microsystems, Inc.